Skip to content

Instantly share code, notes, and snippets.

@cedricvidal
Forked from foxxyz/nginx.conf
Last active June 5, 2017 16:57
Show Gist options
  • Save cedricvidal/d82b511e46fd43ed1ba353fa5301800d to your computer and use it in GitHub Desktop.
Save cedricvidal/d82b511e46fd43ed1ba353fa5301800d to your computer and use it in GitHub Desktop.
Serve current directory via nginx
# Extremely basic development setup to serve the current directory at http://localhost:9001
# Start nginx in this directory with `nginx -p . -c $PWD/nginx.conf`
# Stop nginx with `nginx -p . -s stop`
events {}
daemon off;
http {
# Serve files with correct mimetypes on OSX
# location may have to be adjusted depending on your OS and nginx install
include /usr/local/etc/nginx/mime.types;
server {
listen 9001;
access_log http.access.log;
error_log http.error.log;
root .;
location / {
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment