Skip to content

Instantly share code, notes, and snippets.

@sentenza
Created January 25, 2017 10:37
Show Gist options
  • Save sentenza/8cc0c7f18117be572d89b59099b6b264 to your computer and use it in GitHub Desktop.
Save sentenza/8cc0c7f18117be572d89b59099b6b264 to your computer and use it in GitHub Desktop.
#Module dependencies
# mod_rewrite
# mod_ssl
# This section is only needed if you want to redirect http traffic to https.
# You can live without it but clients will have to type in https:// to reach gitlab.
<VirtualHost *:80>
ServerName domain.com
ServerSignature Off
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [NE,R,L]
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/ssl/public.crt
SSLCertificateKeyFile /etc/ssl/private.key
SSLCertificateChainFile /etc/ssl/intermediate.crt
ServerName domain.com
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment