"Not Found: /" on Ubuntu 16.04 running on apache

I am trying to install gitlab-ce on Ubuntu 16.04.
I’ve followed the steps given above - changes to /etc/gitlab/gitlab.rb and apache2/sites-enabled/000-default files are done.

I’m running the server on port 8000.

So I’ve the following configuration in 000-default file of apache: ({domainname} is the name of my domain)

<VirtualHost *:8000>
ServerName foss.{domainname}
ServerSignature Off

ProxyPreserveHost On

Ensure that encoded slashes are not decoded but left in their encoded state.

http://doc.gitlab.com/ce/api/projects.html#get-single-project

AllowEncodedSlashes NoDecode

<Location />
# New authorization commands for apache 2.4 and up
# http://httpd.apache.org/docs/2.4/upgrading.html#access
Require all granted

#Allow forwarding to gitlab-workhorse
ProxyPassReverse http://127.0.0.1:8080/
ProxyPassReverse http://foss.{domainname}:8000/

</Location>

Apache equivalent of nginx try files

http://serverfault.com/questions/290784/what-is-apaches-equivalent-of-nginxs-try-files

http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab

RewriteEngine on

DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public/
#Forward all requests to gitlab-workhorse except existing files like error documents
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_URI} ^/uploads/.*
RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA,NE]

needed for downloading attachments

#Set up apache error documents, if back end goes down (i.e. 503 error) then a maintenance/deploy page is thrown up.
ErrorDocument 404 /404.html
ErrorDocument 422 /422.html
ErrorDocument 500 /500.html
ErrorDocument 502 /502.html
ErrorDocument 503 /503.html

It is assumed that the log directory is in /var/log/httpd.

For Debian distributions you might want to change this to

/var/log/apache2.

LogFormat “%{X-Forwarded-For}i %l %u %t “%r” %>s %b” common_forwarded
ErrorLog /var/log/apache2/gitlab_foss_error.log
CustomLog /var/log/apache2/gitlab_foss_forwarded.log common_forwarded
CustomLog /var/log/apache2/gitlab_foss_access.log combined env=!dontlog
CustomLog /var/log/apache2/gitlab_foss.log combined

</VirtualHost>

I’ve the following configuration in /etc/gitlab/gitlab.rb
external_url "http://foss.{domainname}:8000/" web_server['external_users'] = ['www-data'] nginx['enable'] = false

I’ve done “gitlab-ctl reconfigure” and “service apache2 restart” as well.

On Acccessing the website as
http://foss.{domainname}:8000/

I’m getting this error
"Not Found: /"

Contents of log file gitlab_foss_access.log

117.195.35.162 - - [26/Oct/2016:23:40:25 +0530] "GET / HTTP/1.1" 404 244 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0"

There is no entry in gitlab_foss_error.log file.

Please help.