1 #This configuration has been tested on GitLab 6.0.0 and GitLab 6.0.1
2 #Note this config assumes unicorn is listening on default port 8080.
8 ServerName gitlab.example.com
14 # New authorization commands for apache 2.4 and up
15 # http://httpd.apache.org/docs/2.4/upgrading.html#access
18 ProxyPassReverse http://127.0.0.1:8080
19 ProxyPassReverse http://gitlab.openmamba.org/
22 #apache equivalent of nginx try files
23 # http://serverfault.com/questions/290784/what-is-apaches-equivalent-of-nginxs-try-files
24 # http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
26 RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
27 RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]
29 # needed for downloading attachments
30 DocumentRoot /var/lib/gitlab/www/public
32 #Set up apache error documents, if back end goes down (i.e. 503 error) then a maintenance/deploy page is thrown up.
33 ErrorDocument 404 /404.html
34 ErrorDocument 422 /422.html
35 ErrorDocument 500 /500.html
36 ErrorDocument 503 /deploy.html
38 LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded
39 ErrorLog /var/log/httpd/gitlab.example.com_error.log
40 CustomLog /var/log/httpd/gitlab.example.com_forwarded.log common_forwarded
41 CustomLog /var/log/httpd/gitlab.example.com_access.log combined env=!dontlog
42 CustomLog /var/log/httpd/gitlab.example.com.log combined