Last active
January 10, 2018 03:53
-
-
Save lattice0/71603a7e7a3c37ca005fd6f28a707ac2 to your computer and use it in GitHub Desktop.
Nginx temporary file host
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
#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