Skip to content

Instantly share code, notes, and snippets.

@shafinmahmud
Created September 17, 2018 07:29
Show Gist options
  • Save shafinmahmud/305ca80714406716812d853042b139d5 to your computer and use it in GitHub Desktop.
Save shafinmahmud/305ca80714406716812d853042b139d5 to your computer and use it in GitHub Desktop.
Minimal directive for Nginx static file sharing
# 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