Skip to content

Instantly share code, notes, and snippets.

@simonw
Created November 20, 2014 23:38
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 simonw/35f0ebf9c1d6df158759 to your computer and use it in GitHub Desktop.
Save simonw/35f0ebf9c1d6df158759 to your computer and use it in GitHub Desktop.
Configuration for running nginx not-as-root in a local directory (place files to serve in a child folder called "app")
daemon off;
events {
worker_connections 1024;
}
http {
access_log /dev/stdout;
error_log /dev/stderr;
types {
text/html html htm shtml;
text/css css;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
}
server {
listen 8002;
index index.html;
root app;
}
}
nginx -p `pwd` -c `pwd`/nginx.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment