mirror of
https://github.com/gitlabhq/gitlab-recipes.git
synced 2026-01-13 00:18:04 -05:00
Missing `ProxyPreserveHost On` caused not working proxy on Debian Squeeze. Fixes issue #45.
34 lines
990 B
Plaintext
34 lines
990 B
Plaintext
# require apache module mod_proxy and mod_proxy_http
|
|
<VirtualHost *:80>
|
|
ServerName gitlab.example.com
|
|
#ServerAlias git.example.com
|
|
|
|
# Uncomment if you want redirect from HTTP to HTTPS
|
|
#RewriteEngine on
|
|
#RewriteCond %{SERVER_PORT} ^80$
|
|
#RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
|
|
|
|
ProxyPass / http://127.0.0.1:3000/
|
|
ProxyPassReverse / http://127.0.0.1:3000/
|
|
ProxyPreserveHost On
|
|
|
|
CustomLog /var/log/apache2/gitlab/access.log combined
|
|
ErrorLog /var/log/apache2/gitlab/error.log
|
|
</VirtualHost>
|
|
<VirtualHost *:443>
|
|
ServerName gitlab.example.com
|
|
ServerAdmin gitlab@example.com
|
|
|
|
SSLEngine On
|
|
SSLCertificateFile /etc/apache2/ssl/server.crt
|
|
SSLCertificateKeyFile /etc/apache2/ssl/server.key
|
|
#SSLCertificateChainFile /etc/apache2/ssl/cacert.pem
|
|
|
|
ProxyPass / http://127.0.0.1:3000/
|
|
ProxyPassReverse / http://127.0.0.1:3000/
|
|
ProxyPreserveHost On
|
|
|
|
CustomLog /var/log/apache2/gitlab/access.log combined
|
|
ErrorLog /var/log/apache2/gitlab/error.log
|
|
</VirtualHost>
|