Created
March 17, 2017 20:33
-
-
Save tpiha/f857b6583d5a22687213ca65f7cb46b5 to your computer and use it in GitHub Desktop.
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 default_server; | |
listen [::]:80 default_server; | |
server_name picostats.com www.picostats.com; | |
return 301 https://$server_name$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
listen [::]:443 ssl; | |
include snippets/ssl-picostats.com.conf; | |
include snippets/ssl-params.conf; | |
server_name picostats.com; | |
return 301 https://www.picostats.com$request_uri; | |
} | |
server { | |
listen 443 ssl http2 default_server; | |
listen [::]:443 ssl http2 default_server; | |
include snippets/ssl-picostats.com.conf; | |
include snippets/ssl-params.conf; | |
root /var/www/html; | |
index index.html index.htm index.nginx-debian.html; | |
server_name _; | |
#location / { | |
# try_files $uri $uri/ =404; | |
# } | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Host $host; | |
proxy_pass http://127.0.0.1:8000; | |
} | |
location /app { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Proto https; | |
proxy_set_header X-Forwarded-Host $remote_addr; | |
proxy_pass http://127.0.0.1:8080; | |
} | |
location ~ /.well-known { | |
allow all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment