<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Pgp on Janik von Rotz</title>
    <link>https://janikvonrotz.ch/tags/pgp/</link>
    <description>Recent content in Pgp on Janik von Rotz</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 31 Mar 2014 09:43:19 +0000</lastBuildDate>
    <atom:link href="https://janikvonrotz.ch/tags/pgp/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Install Nginx</title>
      <link>https://janikvonrotz.ch/2014/03/31/install-nginx/</link>
      <pubDate>Mon, 31 Mar 2014 09:43:19 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2014/03/31/install-nginx/</guid>
      <description>&lt;p&gt;&lt;em&gt;This post is part of my &lt;a href=&#34;https://janikvonrotz.ch/your-own-virtual-private-server-hosting-solution/&#34;&gt;Your own Virtual Private Server hosting solution&lt;/a&gt; project.&lt;/em&gt;&lt;br&gt;&#xA;&lt;em&gt;Get the latest version of this article here: &lt;a href=&#34;https://gist.github.com/9345486&#34;&gt;https://gist.github.com/9345486&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;Nginx (pronounced &amp;ldquo;engine-ex&amp;rdquo;) can be used as an open source reverse proxy server, as well as a load balancer, HTTP cache, and not to forget a fast and powerful web server.&lt;/p&gt;&#xA;&lt;h1 id=&#34;requirements&#34;&gt;Requirements&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/03/13/deploy-ubuntu-server/&#34;&gt;Ubuntu server&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;installation&#34;&gt;Installation&lt;/h1&gt;&#xA;&lt;p&gt;As the version of Nginx that comes with Ubuntu can be incredibly outdated we add the Nginx project repository.&lt;/p&gt;&#xA;&lt;p&gt;Add the PGP packge key.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add -&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Get the release code name of your Ubuntu installation.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cat /etc/lsb-release&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Where &lt;code&gt;DISTRIB_CODENAME&lt;/code&gt; is the release codename.&lt;/p&gt;&#xA;&lt;p&gt;Or get the release code name of your Debian installation.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cat /etc/os-release&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Where &lt;code&gt;VERSION&lt;/code&gt; is the release codename.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s a new source list for nginx.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo vi /etc/apt/sources.list.d/nginx.list&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Add the following two line for an Ubuntu codename, f.g. mine was &amp;ldquo;precise&amp;rdquo;.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;deb http://nginx.org/packages/ubuntu/ [codename] nginx&#xA;deb-src http://nginx.org/packages/ubuntu/ [codename] nginx&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Add the following two line for a Debian codename, f.g. mine was &amp;ldquo;squeeze&amp;rdquo;.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;deb http://nginx.org/packages/debian/ [codename] nginx&#xA;deb-src http://nginx.org/packages/debian/ [codename] nginx&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If you have installed an old version of Nginx (such as your distro’s native version) you can get rid of it quickly by using this command.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo aptitude purge nginx nginx-light nginx-full nginx-extras nginx-common&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Be aware the the command purge will also delete all related config files.&lt;/p&gt;&#xA;&lt;p&gt;Update the package list and install Nginx.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo aptitude update&#xA;sudo aptitude install nginx&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Check nginx version.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;nginx -v&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Add the nginx user to the built-in www-data group.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo usermod -a -G www-data nginx&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1 id=&#34;source&#34;&gt;Source&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://blog.chrismeller.com/configuring-and-optimizing-php-fpm-and-nginx-on-ubuntu-or-debian&#34;&gt;Configuring and Optimizing PHP-FPM and Nginx on Ubuntu&lt;/a&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
