Created
March 17, 2015 15:11
-
-
Save mrnejc/85d914cb69bd3cc37d1f to your computer and use it in GitHub Desktop.
nginx https 301 redirect
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
# copy/paste from comment at | |
# https://www.digitalocean.com/community/questions/http-https-redirect-positive-ssl-on-nginx | |
server { | |
listen 80; | |
server_name devly.co www.devly.co; | |
return 301 https://$server_name$request_uri; | |
} | |
server { | |
listen 443 ssl spdy; | |
server_name devly.co www.devly.co; | |
ssl on; | |
ssl_certificate /var/www/devly.co/cert/ssl-bundle.crt; | |
ssl_certificate_key /var/www/devly.co/cert/devly_co.key; | |
access_log /var/log/nginx/devly.co.access.log rt_cache; | |
error_log /var/log/nginx/devly.co.error.log; | |
root /var/www/devly.co/htdocs; | |
index index.php index.htm index.html; | |
include common/wpfc.conf; | |
include common/wpcommon.conf; | |
include common/locations.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment