Skip to content

Instantly share code, notes, and snippets.

@nakatanakatana
Created June 7, 2015 11:39
Show Gist options
  • Save nakatanakatana/43bdab0475d5adcbf235 to your computer and use it in GitHub Desktop.
Save nakatanakatana/43bdab0475d5adcbf235 to your computer and use it in GitHub Desktop.
<VirtualHost address.domain:443>
ServerName address.domain
SSLEngine on
SSLProxyEngine on
RequestHeader set X_FORWARDED_PROTO 'https'
SSLCertificateFile /etc/apache2/conf/server.crt
SSLCertificateKeyFile /etc/apache2/conf/server.key
ErrorLog "/var/log/apache2/gitlab_error.log"
TransferLog "/var/log/apache2/gitlab_access.log"
ProxyPass / http://address.domain:8081/
ProxyPassReverse / https://address.domain:8081/
# Rewrite 'Location' header to 'https'
Header edit Location ^http://address.domain/ https://address.domain/
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment