Created
October 17, 2018 22:32
-
-
Save thehackermonkey/a0735184912f30b3af52fb3a3ad1ef08 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; | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
listen [::]:443 ssl ipv6only=on; # managed by Certbot | |
listen 443 ssl; | |
# listen 443 default_server; | |
# managed by Certbot | |
#ssl on; | |
ssl_certificate /etc/letsencrypt/live/miprimertrabajo.io/full$ | |
ssl_certificate_key /etc/letsencrypt/live/miprimertrabajo.io/$ | |
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by$ | |
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by C$ | |
server_name miprimertrabajo.io www.miprimertrabajo.io; | |
location / { | |
proxy_pass http://localhost:8080/; | |
proxy_http_version 1.1; | |
# proxy_redirect http:// https://; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
# First attempt to serve request as file, then | |
# as directory, then fall back to displaying a 40$ | |
# try_files $uri $uri/ =404; | |
} | |
if ($host = miprimertrabajo.io) { | |
return 301 https://$host$request_uri; | |
} | |
# managed by Certbot | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment