-
-
Save agneym/39a4f549a8efb6923aab6aa823a78a08 to your computer and use it in GitHub Desktop.
Serve current directory via nginx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 3000; | |
access_log http.access.log; | |
error_log http.error.log; | |
root .; | |
location / { | |
try_files $uri $uri/ /index.html; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment