Created
July 19, 2016 17:37
-
-
Save renatocron/838d867fce720e1eaabcdb96f5d49211 to your computer and use it in GitHub Desktop.
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 foobar.com www.foobar.com www.foobar.com.br; | |
location = / { | |
return 302 http://foobar.com.br?; | |
} | |
location / { | |
return 302 http://foobar.com.br$request_uri; | |
} | |
} | |
server { | |
listen 443 ssl; | |
ssl_certificate /etc/nginx/ssl/nginx.crt; | |
ssl_certificate_key /etc/nginx/ssl/nginx.key; | |
server_name foobar.com.br; | |
location / { | |
# proxy_pass ... | |
# todo o resto arqui... | |
} | |
} | |
------- | |
pra gerar o arquivo | |
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt | |
antes tem q criar o directorio!! | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment