<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Nginx on Daniel Pomfret</title>
    <link>https://pomfret.uk/tags/nginx/</link>
    <description>Recent content in Nginx on Daniel Pomfret</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>© Daniel Pomfret</copyright>
    <lastBuildDate>Tue, 02 Apr 2019 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://pomfret.uk/tags/nginx/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Nginx Proxy Wordpress Configuration</title>
      <link>https://pomfret.uk/posts/nginx-proxy-wordpress-configuration/</link>
      <pubDate>Tue, 02 Apr 2019 00:00:00 +0000</pubDate>
      <guid>https://pomfret.uk/posts/nginx-proxy-wordpress-configuration/</guid>
      <description>&lt;p&gt;If you need to proxy your Wordpress blog via Nginx. This is the configuration I have recently used.&lt;/p&gt;&#xA;&lt;p&gt;Update &lt;code&gt;&amp;lt;server-name&amp;gt;&lt;/code&gt; with your intended domain name. &lt;code&gt;&amp;lt;ip-address&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;port&amp;gt;&lt;/code&gt; with the Wordpress servers details.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-nginx&#34; data-lang=&#34;nginx&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;server&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;server_name&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;lt;server-name&amp;gt;&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;gzip&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;on&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;gzip_min_length&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;10240&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;gzip_types&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;text/plain&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;text/css&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;text/xml&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;text/javascript&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;application/x-javascript&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;application/xml&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;gzip_disable&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;MSIE&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;[1-6]\.&amp;#34;&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;add_header&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;Cache-Control&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;public&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;location&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;/&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#f92672&#34;&gt;proxy_set_header&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;X-Real-IP&lt;/span&gt;  $remote_addr;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#f92672&#34;&gt;proxy_set_header&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;X-Forwarded-For&lt;/span&gt; $remote_addr;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#f92672&#34;&gt;proxy_set_header&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;Host&lt;/span&gt; $host;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#f92672&#34;&gt;proxy_pass&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;http://&amp;lt;ip-address&amp;gt;:&amp;lt;port&amp;gt;&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Test Nginx Configuration</title>
      <link>https://pomfret.uk/posts/test-nginx-configuration/</link>
      <pubDate>Tue, 02 Apr 2019 00:00:00 +0000</pubDate>
      <guid>https://pomfret.uk/posts/test-nginx-configuration/</guid>
      <description>&lt;p&gt;To test your Nginx configuration files, run the following command:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nginx -c /etc/nginx/nginx.conf -t&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It will indicate if your configuration file syntax is correct.&lt;/p&gt;&#xA;&lt;h4 id=&#34;configuration-check-failure&#34;&gt;Configuration Check Failure&lt;/h4&gt;&#xA;&lt;p&gt;root@proxy:/etc/nginx/sites-enabled# nginx -c /etc/nginx/nginx.conf -t&lt;br&gt;&#xA;nginx: [emerg] a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-enabled/test01:2&lt;br&gt;&#xA;nginx: configuration file /etc/nginx/nginx.conf test failed&lt;/p&gt;&#xA;&lt;h4 id=&#34;configuration-check-success&#34;&gt;Configuration Check Success&lt;/h4&gt;&#xA;&lt;p&gt;root@proxy:/etc/nginx/sites-enabled# nginx -c /etc/nginx/nginx.conf -t&lt;br&gt;&#xA;nginx: the configuration file /etc/nginx/nginx.conf syntax is ok&lt;br&gt;&#xA;nginx: configuration file /etc/nginx/nginx.conf test is successful&lt;/p&gt;</description>
    </item>
    <item>
      <title>NGINX SSL Ciphers</title>
      <link>https://pomfret.uk/posts/nginx-ssl-ciphers/</link>
      <pubDate>Fri, 14 Oct 2016 00:00:00 +0000</pubDate>
      <guid>https://pomfret.uk/posts/nginx-ssl-ciphers/</guid>
      <description>&lt;p&gt;With browsers such as Google Chrome and Mozilla Firefox forcing websites to use better ciphers, along with websites such as PayPal no longer support older versions of TLS it&amp;rsquo;s time to update your NGINX installations with the latest version of OpenSSL (TLS 1.2+) and set some decent ciphers.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m finding the following cipher set are passing tests such as SSL Labs and CryptoReport - this could change in the future.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
