Created
August 9, 2012 16:04
-
-
Save axilleas/3305454 to your computer and use it in GitHub Desktop.
Apache configuration file for gitlab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# thanks to http://www.andmarios.com/en/2012/06/gitlab-on-an-ubuntu-10-04-server-with-apache/ | |
<VirtualHost *:80> | |
ServerName arch.localdomain | |
DocumentRoot /home/gitlab/gitlab/public | |
ErrorLog /var/log/httpd/gitlab_error_log | |
CustomLog /var/log/http/gitlab_access_log combined | |
<Directory /home/gitlab/gitlab/public> | |
AllowOverride All | |
Options -MultiViews | |
</Directory> | |
RewriteEngine on | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} | |
</VirtualHost> | |
<VirtualHost your_ip_here:443> | |
ServerName arch.localdomain | |
DocumentRoot /home/gitlab/gitlab/public | |
ErrorLog /var/log/httpd/gitlab_error_log | |
CustomLog /var/log/http/gitlab_access_log combined | |
<Proxy balancer://unicornservers> | |
BalancerMember http://127.0.0.1:8080 | |
</Proxy> | |
<Directory /home/gitlab/gitlab/public> | |
AllowOverride All | |
Options -MultiViews | |
</Directory> | |
RewriteEngine on | |
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f | |
RewriteRule ^/(.*)$ balancer://unicornservers%{REQUEST_URI} [P,QSA,L] | |
ProxyPass / balancer://unicornservers/ | |
ProxyPassReverse / balancer://unicornservers/ | |
ProxyPreserveHost on | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
SSLEngine On | |
SSLCertificateFile /etc/httpd/gitlab.crt | |
SSLCertificateKeyFIle /etc/httpd/gitlab.key | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment