Created
July 9, 2019 09:28
-
-
Save takinbo/883a953492d7ed3082a5410e68672794 to your computer and use it in GitHub Desktop.
sample nginx configuration for blockstream esplora
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 explorer.local; | |
location ~ ^/api(/?)(.*) { | |
proxy_pass http://127.0.0.1:4000/$2; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
port_in_redirect off; | |
proxy_connect_timeout 300; | |
} | |
location / { | |
proxy_pass http://127.0.0.1:6000; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
port_in_redirect off; | |
proxy_connect_timeout 300; | |
} | |
gzip on; | |
gzip_http_version 1.1; | |
gzip_vary on; | |
gzip_comp_level 6; | |
gzip_proxied any; | |
gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript; | |
gzip_buffers 16 8k; | |
gzip_disable "MSIE [1-6].(?!.*SV1)"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment