Last active
January 11, 2020 08:08
-
-
Save hskang9/b96e873f0f09643fa6c5360aef40c40b to your computer and use it in GitHub Desktop.
nginx for substrate
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
user www-data; | |
worker_processes 4; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { | |
server { | |
server_name pyra.me; # or the domain you want | |
location / { | |
#Enables socket connectiosn over https, will forward to the http version | |
proxy_pass http://localhost:9944; #could be localhost if Echo and NginX are on the same box | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "Upgrade"; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_pass_header X-XSRF-TOKEN; | |
} | |
listen [::]:443 ssl; # managed by Certbot | |
listen 443 ssl; # managed by Certbot | |
ssl_certificate /etc/letsencrypt/live/pyra.me/fullchain.pem; # managed by Certbot | |
ssl_certificate_key /etc/letsencrypt/live/pyra.me/privkey.pem; # managed by Certbot | |
} | |
} | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment