Created
September 17, 2018 07:29
-
-
Save shafinmahmud/305ca80714406716812d853042b139d5 to your computer and use it in GitHub Desktop.
Minimal directive for Nginx static file sharing
This file contains hidden or 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
# Add following location directive to the default server block located in | |
# /etc/nginx/conf.d/default.conf (if you installed from official NGINX repository) or, | |
# /etc/nginx/sites-enabled/default (if you installed from Debian or Ubuntu repositories) | |
# This location directive serve static content from the root | |
location /shared { | |
root /root/directory/of/files/; | |
autoindex on; | |
} | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment