Skip to content

Instantly share code, notes, and snippets.

@achiko
Forked from jgeurts/gist:5847108
Last active August 29, 2015 13:58
Show Gist options
  • Save achiko/10393459 to your computer and use it in GitHub Desktop.
Save achiko/10393459 to your computer and use it in GitHub Desktop.
Install Nginx on Ubuntu
# From: http://www.cyberciti.biz/tips/using-nginx-as-reverse-proxy.html
# and: http://www.cyberciti.biz/faq/howto-linux-unix-setup-nginx-ssl-proxy/
# and: http://nginx.org/en/docs/http/websocket.html
# Run the following commands as su
sudo -s
# Use the stable version of nginx
nginx=stable
# Add nginx repository source
add-apt-repository ppa:nginx/$nginx
# Update the list of packages
apt-get update
# Install the latest stable version of nginx
apt-get install nginx
# Comment out default nginx responders (Around line 72, look for: include /etc/nginx/sites-enabled/*;
vi /etc/nginx/nginx.conf
# Edit the config file for nginx
vi /etc/nginx/conf.d/default.conf
# Make sure the nginx service is set to start automatically
update-rc.d nginx defaults
# Start nginx
service nginx start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment