mirror of
https://github.com/jlengrand/gitlab-recipes.git
synced 2026-03-10 08:11:17 +00:00
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
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
|
|
|
|
# Uncomment the following line to prevent redirects to http on https only vhosts
|
|
#RequestHeader set X-Forwarded-Proto "https"
|
|
|
|
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>
|