Last active
May 30, 2016 18:05
-
-
Save xerosanyam/4bb638ab49ee496e4290a24a0bf85ce4 to your computer and use it in GitHub Desktop.
Settinp up nginx as Static File Server (Minimal)
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
sudo add-apt-repository ppa:nginx/stable | |
sudo apt-get update | |
sudo apt-get install nginx | |
nginx -v | |
http://app.mindmapmaker.org/#m:mm494aabe32c8e4144829c631c0870a230 | |
To start nginx (Linux) | |
sudo /etc/init.d/nginx start | |
To stop nginx (Linux) | |
sudo /etc/init.d/nginx stop | |
To reload nginx config (Linux) | |
sudo /etc/init.d/nginx reload | |
Location of sites (Linux) | |
/var/www/ | |
To check to see if it is running | |
ps -ef | grep nginx |
sudo apt-get install net-tools to install netstat & see netstat -plten
in cloud 9 change etc/nginx/sites-available/default to point to 8080 in place of 80
all other settings are intact.
To make files visible like filesystem
- vi /etc/nginx/sites-available/default
location /{
... ( some other lines )
autoindex on;
... ( some other lines )
} - cd /var/www/html/
sudo chown ubuntu .
rm *
touch hw.txt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/leommoore/2701379