Last active
August 29, 2015 14:01
-
-
Save achiko/0ac7a203359a9d39a5e0 to your computer and use it in GitHub Desktop.
Latest version nginx on ubuntu
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
https://www.digitalocean.com/community/articles/how-to-install-the-latest-version-of-nginx-on-ubuntu-12-10 | |
//-- Install latest version Nginx On Ubuntu | |
sudo apt-get install python-software-properties | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:nginx/stable | |
sudo apt-get install software-properties-common | |
sudo apt-get update | |
sudo apt-get install nginx | |
service nginx status | |
//-- | |
nano /etc/nginx/conf.d/your.domain.com.conf | |
server { | |
listen 80; | |
server_name your.domain.com; | |
location / { | |
proxy_pass http://localhost:5000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} | |
} | |
// etc/nginx/nginx.conf | |
// You need to add this flag in the http context: | |
server_names_hash_bucket_size 64; | |
--- Remove Nginx from Ubuntu completely | |
sudo apt-get remove nginx | |
sudo apt-get purge nginx-* | |
sudo apt-get autoremove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment