Skip to content

Instantly share code, notes, and snippets.

@Paxa
Created January 21, 2019 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Paxa/6316c76303ba56a1fb4f537a3af76aed to your computer and use it in GitHub Desktop.
Save Paxa/6316c76303ba56a1fb4f537a3af76aed to your computer and use it in GitHub Desktop.
Nginx minimal config for debugging
# 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