File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
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>
8
+ ServerName gitlab.example.com
9
+ ServerSignature Off
10
+
11
+ ProxyPreserveHost On
12
+
13
+ <Location />
14
+ Require all granted
15
+
16
+ ProxyPassReverse http://127.0.0.1:8080
17
+ ProxyPassReverse http://gitlab.example.com/
18
+ </Location>
19
+
20
+ #apache equivalent of nginx try files
21
+ # http://serverfault.com/questions/290784/what-is-apaches-equivalent-of-nginxs-try-files
22
+ # http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
23
+ RewriteEngine on
24
+ RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
25
+ RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]
26
+
27
+ # needed for downloading attachments
28
+ DocumentRoot /home/git/gitlab/public
29
+
30
+ #Set up apache error documents, if back end goes down (i.e. 503 error) then a maintenance/deploy page is thrown up.
31
+ ErrorDocument 404 /404.html
32
+ ErrorDocument 422 /422.html
33
+ ErrorDocument 500 /500.html
34
+ ErrorDocument 503 /deploy.html
35
+
36
+ LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded
37
+ ErrorLog /var/log/httpd/logs/gitlab.example.com_error.log
38
+ CustomLog /var/log/httpd/logs/gitlab.example.com_forwarded.log common_forwarded
39
+ CustomLog /var/log/httpd/logs/gitlab.example.com_access.log combined env=!dontlog
40
+ CustomLog /var/log/httpd/logs/gitlab.example.com.log combined
41
+
42
+ </VirtualHost>
You can’t perform that action at this time.
0 commit comments