Created
April 30, 2013 14:11
-
-
Save sanguis/5488977 to your computer and use it in GitHub Desktop.
nginx redirect ssl or domain to domain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name support.knectar.com; | |
rewrite ^/(.*) https://rwww.example.com/$1 permanent; | |
} | |
server { | |
listen 443; | |
ssl on; | |
ssl_certificate /home/sites/certs/ssl-bundle.crt; | |
ssl_certificate_key /home/sites/certs/myserver.key; | |
#enables SSLv3/TLSv1, but not SSLv2 which is weak and should no longer be used. | |
ssl_protocols SSLv3 TLSv1; | |
#Disables all weak ciphers | |
ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment