Skip to content

Instantly share code, notes, and snippets.

@foxxyz
Last active March 11, 2022 15:13
  • Star 23 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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 nginx.conf`
# Stop nginx with `nginx -p . -s stop`
events {}
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 / {
}
}
}
@NightMachinery
Copy link

Does this also include directory listings?

@foxxyz
Copy link
Author

foxxyz commented Aug 30, 2021

Does this also include directory listings?

To enable directory listings, check out autoindex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment