Skip to content

Instantly share code, notes, and snippets.

@rchrd2
Last active December 27, 2016 01:07
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 rchrd2/a6f0214543420d29bbeb9c2dfaf156ec to your computer and use it in GitHub Desktop.
Save rchrd2/a6f0214543420d29bbeb9c2dfaf156ec to your computer and use it in GitHub Desktop.
NGINX CLI – how to start nginx as a process
error_log /dev/stderr;
events {}
http {
#access_log /dev/stdout;
access_log /dev/null;
server {
listen 8066;
server_name _;
location / {
proxy_pass http://rchrd.net;
proxy_set_header Host $http_host;
}
}
}
nginx -p `mktemp -d` -c `pwd`/rproxy.conf -g "pid `mktemp -u`; daemon off;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment