I have GitLab setup on CentOS 7.2 and I"m using Apache and a remote postgresql database. I have everything installed and seems to be working but the web interface. I’m not sure where my problem lies. I’m getting a proxy error when trying to browse to the page.
Here is my apache config:
sudo cat /etc/httpd/conf.d/gitlab.conf
<VirtualHost 10.150.1.65>
ServerName gitlab1.borg.local
#ServerName gitlab.borg.local
ServerSignature Off
HostnameLookups Off
ProxyRequests Off
ProxyPreserveHost On
Options +Multiviews +FollowSymLinks
#DocumentRoot /opt/gitlab
LogLevel Debug
# 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 from all
#Allow forwarding to gitlab-workhorse
ProxyPass http://gitlab1.borg.local:8080
ProxyPassReverse http://gitlab1.borg.local:8080
</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
#RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
#Forward all requests to gitlab-workhorse
#RewriteRule .* http://gitlab1.borg.local:8080%{REQUEST_URI} [P,QSA,NE]
#Chagne ngninx ports for this
#RewriteRule .* http://127.0.0.1:1180%{REQUEST_URI} [P,QSA]
<Proxy gitlab1.borg.local>
Require ip 127.0.0.1 10.0.0.0/8 192.168.0.0/16 172.16.0.0/12
</Proxy>
# needed for downloading attachments
#DocumentRoot /home/git/gitlab/public
#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 503 /deploy.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/httpd/gitlab.borg.local_error.log
CustomLog /var/log/httpd/gitlab.borg.local_forwarded.log common_forwarded
CustomLog /var/log/httpd/gitlab.borg.local_access.log combined env=!dontlog
CustomLog /var/log/httpd/gitlab.borg.local.log combined
</VirtualHost>
sudo cat /etc/gitlab/gitlab.rb | grep -v ‘^$|^\s*#’
external_url 'http://gitlab1.borg.local'
gitlab_rails['time_zone'] = 'America/Chicago'
gitlab_rails['db_adapter'] = "postgresql"
gitlab_rails['db_encoding'] = "unicode"
gitlab_rails['db_collation'] = 'UTF8'
gitlab_rails['db_database'] = "gitlabhq_production"
gitlab_rails['db_username'] = "gitlab"
gitlab_rails['db_password'] =
gitlab_rails['db_host'] = "10.150.1.80"
gitlab_rails['db_port'] = "5432"
unicorn['listen'] = '10.150.1.65'
unicorn['port'] = '8080'
postgresql['enable'] = false
web_server['username'] = 'gitlab-www'
web_server['group'] = 'gitlab-www'
nginx['enable'] = false
[Fri Feb 12 11:16:37.582660 2016] [proxy_fcgi:debug] [pid 40754] mod_proxy_fcgi.c(946): [client 10.150.1.95:6673] AH01076: url: http://gitlab1.borg.local:80
80/favicon.ico proxyname: (null) proxyport: 0
[Fri Feb 12 11:16:37.582666 2016] [proxy_fcgi:debug] [pid 40754] mod_proxy_fcgi.c(949): [client 10.150.1.95:6673] AH01077: declining URL http://gitlab1.borg
.local:8080/favicon.ico
[Fri Feb 12 11:16:37.582678 2016] [proxy:debug] [pid 40754] proxy_util.c(2203): AH00942: HTTP: has acquired connection for (gitlab1.borg.local)
[Fri Feb 12 11:16:37.582693 2016] [proxy:debug] [pid 40754] proxy_util.c(2256): [client 10.150.1.95:6673] AH00944: connecting http://gitlab1.borg.local:8080
/favicon.ico to gitlab1.borg.local:8080
[Fri Feb 12 11:16:37.582707 2016] [proxy:debug] [pid 40754] proxy_util.c(2422): [client 10.150.1.95:6673] AH00947: connected /favicon.ico to gitlab1.borg.lo
cal:8080
[Fri Feb 12 11:16:37.582852 2016] [proxy:debug] [pid 40754] proxy_util.c(2798): AH02824: HTTP: connection established with 10.150.1.65:8080 (gitlab1.borg.lo
cal)
[Fri Feb 12 11:16:37.582882 2016] [proxy:debug] [pid 40754] proxy_util.c(2923): AH00962: HTTP: connection complete to 10.150.1.65:8080 (gitlab1.borg.local)
[Fri Feb 12 11:16:37.855547 2016] [proxy:debug] [pid 40754] proxy_util.c(2218): AH00943: http: has released connection for (gitlab1.borg.local)