Created
March 7, 2019 08:05
-
-
Save xamedow/fbe54bdde88597bbdd4ed5fa64063c3e to your computer and use it in GitHub Desktop.
Nginx static files for local virtual hosts support
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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; | |
#gzip on; | |
server { | |
listen 82; | |
server_name YOUR VIRTUAL HOST DOMAIN NAME HERE; | |
location / { | |
proxy_set_header X-Real_IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-NginX-Proxy true; | |
proxy_pass http://127.0.0.1:3000; | |
proxy_connect_timeout 2s; | |
proxy_redirect off; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment