Skip to content

Instantly share code, notes, and snippets.

@vnykmshr
Last active August 29, 2015 13:57
Show Gist options
  • Save vnykmshr/9610516 to your computer and use it in GitHub Desktop.
Save vnykmshr/9610516 to your computer and use it in GitHub Desktop.
Install latest nginx
# install the Nginx team’s package signing key
curl http://nginx.org/keys/nginx_signing.key | apt-key add -
# Add the repo to apt sources:
echo -e "deb http://nginx.org/packages/ubuntu/ `lsb_release -cs` nginx\ndeb-src http://nginx.org/packages/ubuntu/ `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list
# Resynchronize the package index files from their sources:
apt-get update
# install nginx
apt-get install nginx
# trouble shooting
# fix dpkg error "Trying to overwrite x which is also in package y" in Ubuntu
# the offending package name will be shown in the dpkg error
dpkg -i --force-overwrite /var/cache/apt/archives/nginx_1.4.6-1~saucy_amd64.deb
apt-get install nginx -f
apt-get autoremove
# note checkout nginx.conf for adding new site config, /etc/nginx/conf.d/app.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment