]> git.pld-linux.org Git - packages/gitlab-ce.git/blame - apache.conf
v8.12.1
[packages/gitlab-ce.git] / apache.conf
CommitLineData
edff9e13
ER
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.
3#Module dependencies
4# mod_rewrite
5# mod_proxy
6# mod_proxy_http
7<VirtualHost *:80>
bb222ff7 8 ServerName gitlab.example.org
edff9e13
ER
9 ServerSignature Off
10
11 ProxyPreserveHost On
12
13 <Location />
14 # New authorization commands for apache 2.4 and up
15 # http://httpd.apache.org/docs/2.4/upgrading.html#access
16 Require all granted
17
18 ProxyPassReverse http://127.0.0.1:8080
bb222ff7 19 ProxyPassReverse http://gitlab.example.org/
edff9e13
ER
20 </Location>
21
01851fd6 22 # Apache equivalent of nginx try files
edff9e13
ER
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
25 RewriteEngine on
26 RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
27 RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]
28
01851fd6 29 # Needed for downloading attachments
34df8417 30 DocumentRoot /usr/lib/gitlab/public
edff9e13 31
01851fd6 32 # Set up apache error documents, if back end goes down (i.e. 503 error) then a maintenance/deploy page is thrown up.
edff9e13
ER
33 ErrorDocument 404 /404.html
34 ErrorDocument 422 /422.html
35 ErrorDocument 500 /500.html
36 ErrorDocument 503 /deploy.html
37
38 LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded
01851fd6
ER
39 ErrorLog /var/log/httpd/gitlab_error.log
40 CustomLog /var/log/httpd/gitlab_forwarded.log common_forwarded
41 CustomLog /var/log/httpd/gitlab_access.log combined env=!dontlog
42 CustomLog /var/log/httpd/gitlab.log combined
edff9e13
ER
43
44</VirtualHost>
This page took 0.040914 seconds and 4 git commands to generate.