Skip to content

Instantly share code, notes, and snippets.

@axilleas
Created August 9, 2012 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axilleas/3305454 to your computer and use it in GitHub Desktop.
Save axilleas/3305454 to your computer and use it in GitHub Desktop.
Apache configuration file for gitlab
# 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