Skip to content

Instantly share code, notes, and snippets.

@achiko
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save achiko/0ac7a203359a9d39a5e0 to your computer and use it in GitHub Desktop.
Save achiko/0ac7a203359a9d39a5e0 to your computer and use it in GitHub Desktop.
Latest version nginx on ubuntu
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