]>
Commit | Line | Data |
---|---|---|
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> | |
d440404c ER |
8 | ServerName gitlab.example.org |
9 | ServerSignature Off | |
10 | ProxyPreserveHost On | |
11 | ||
12 | <Location /> | |
13 | # New authorization commands for apache 2.4 and up | |
14 | # http://httpd.apache.org/docs/2.4/upgrading.html#access | |
15 | Require all granted | |
16 | ||
17 | ProxyPassReverse http://127.0.0.1:8080 | |
18 | ProxyPassReverse http://gitlab.example.org/ | |
19 | </Location> | |
20 | ||
21 | # Apache equivalent of nginx try files | |
22 | # http://serverfault.com/questions/290784/what-is-apaches-equivalent-of-nginxs-try-files | |
23 | # http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab | |
24 | RewriteEngine on | |
25 | RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f | |
26 | RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA] | |
27 | ||
28 | # Needed for downloading attachments | |
29 | DocumentRoot /usr/lib/gitlab/public | |
30 | ||
31 | # Set up apache error documents, if back end goes down (i.e. 503 error) then a maintenance/deploy page is thrown up. | |
32 | ErrorDocument 404 /404.html | |
33 | ErrorDocument 422 /422.html | |
34 | ErrorDocument 500 /500.html | |
35 | ErrorDocument 503 /deploy.html | |
36 | ||
37 | LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded | |
38 | ErrorLog /var/log/httpd/gitlab_error.log | |
39 | CustomLog /var/log/httpd/gitlab_forwarded.log common_forwarded | |
40 | CustomLog /var/log/httpd/gitlab_access.log combined env=!dontlog | |
41 | CustomLog /var/log/httpd/gitlab.log combined | |
edff9e13 | 42 | </VirtualHost> |