Created
January 21, 2019 11:41
-
-
Save Paxa/6316c76303ba56a1fb4f537a3af76aed to your computer and use it in GitHub Desktop.
Nginx minimal config for debugging
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
# run with: | |
# nginx -c $(pwd)/debug.conf | |
daemon off; | |
worker_processes 1; | |
events { | |
worker_connections 128; | |
} | |
error_log /dev/stdout info; | |
http { | |
server_tokens off; | |
charset utf-8; | |
access_log /dev/stdout combined; | |
error_log /dev/stdout info; | |
server { | |
listen 0.0.0.0:5000 default; | |
server_name example.com; | |
error_log /dev/stdout info; | |
location / { | |
proxy_pass http://127.0.0.1:3000; | |
} | |
} | |
server { | |
listen 0.0.0.0:5000; | |
server_name www.example.com; | |
access_log /dev/stdout combined; | |
error_log /dev/stdout info; | |
return 301 http://example.com$request_uri; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment