Created
November 10, 2016 02:05
-
-
Save giordanolima/088d8a93009d520ab5a7651eba0555ca to your computer and use it in GitHub Desktop.
Http to Https - Nginx
This file contains 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; | |
listen *:443 ssl; | |
server_name domain.com; | |
root /var/www/domain.com/web/public; | |
ssl on; | |
ssl_certificate /path/to/cert/fullchain.pem; | |
ssl_certificate_key /path/to/key.pem; | |
# Outras diretivas para os cert... | |
if ($scheme = http) { | |
return 301 https://$http_host$request_uri; | |
} | |
# E todas as outras diretivas que tu tem no teu vhosts | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment