Skip to content

Instantly share code, notes, and snippets.

@lattice0
Last active January 10, 2018 03:53
Show Gist options
  • Save lattice0/71603a7e7a3c37ca005fd6f28a707ac2 to your computer and use it in GitHub Desktop.
Save lattice0/71603a7e7a3c37ca005fd6f28a707ac2 to your computer and use it in GitHub Desktop.
Nginx temporary file host
#Work in progress... Didnt finish this script yet
#With sudo:
sudo docker run --name nginx --rm -p 8080:80 -v /home/lz/Downloads:/usr/share/nginx/html:ro -d --entrypoint sed nginx '/location \/ {/a autoindex on;' /etc/nginx/conf.d/default.conf && sudo docker exec -ti nginx "nginx -g daemon off"
sudo docker run --name nginx --rm -p 8080:80 -v /home/lz/Downloads:/usr/share/nginx/html:ro -ti -d --entrypoint sed nginx '/location \/ {/a autoindex on;' /etc/nginx/conf.d/default.conf && sudo docker exec -ti nginx "nginx -g daemon off"
#Without sudo:
#sed '/location \/ {/a autoindex on;' /etc/nginx/conf.d/default.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment