<?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 Evan Hoffman</title><link>https://evan.wtf/tags/nginx/</link><description>Recent content in Nginx on Evan Hoffman</description><generator>Hugo</generator><language>en-US</language><copyright>Evan Hoffman</copyright><lastBuildDate>Fri, 28 Mar 2014 15:17:30 +0000</lastBuildDate><atom:link href="https://evan.wtf/tags/nginx/index.xml" rel="self" type="application/rss+xml"/><item><title>Rails app redirects to wrong port?</title><link>https://evan.wtf/2014/03/28/rails-app-redirects-to-wrong-port/</link><pubDate>Fri, 28 Mar 2014 15:17:30 +0000</pubDate><guid>https://evan.wtf/2014/03/28/rails-app-redirects-to-wrong-port/</guid><description>&lt;p&gt;Ran into a situation in which a rails application was redirecting to /login to force a user to log in, but the Location header said &amp;ldquo;&lt;a href="http://site.com:8085/login%22"&gt;http://site.com:8085/login"&lt;/a&gt;, because nginx was listening on port 8085 on that server. At first I looked to see if there was something in the application code that was doing this, or maybe some setting I could change to fix it, but came up blank. After some Googling I found the answer right &lt;a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect"&gt;in the Nginx docs&lt;/a&gt; (below is my slightly-modified solution that handles https urls as well):&lt;/p&gt;</description></item><item><title>Digital Ocean - First Impressions</title><link>https://evan.wtf/2013/07/24/digital-ocean-first-impressions/</link><pubDate>Wed, 24 Jul 2013 08:59:06 +0000</pubDate><guid>https://evan.wtf/2013/07/24/digital-ocean-first-impressions/</guid><description>&lt;p&gt;For the past few years I&amp;rsquo;ve been hosting this site on an old desktop in my basement on my FiOS connection. This was one of the things I really liked when I switched from Cablevision to Verizon - they don&amp;rsquo;t block port 80 inbound, so I didn&amp;rsquo;t have to pay for separate hosting. My &amp;ldquo;server&amp;rdquo; was an old AMD desktop with 1 gig ram and a sata drive. It was ok; my site was slow but I was ok with that. I configured Nginx to cache the static assets which sped most things up to &amp;ldquo;ok&amp;rdquo; levels but it was never fast.&lt;/p&gt;</description></item><item><title>Using Nginx as a caching proxy in front of Wordpress</title><link>https://evan.wtf/2012/03/07/using-nginx-as-a-caching-proxy-in-front-of-wordpress/</link><pubDate>Wed, 07 Mar 2012 16:43:28 +0000</pubDate><guid>https://evan.wtf/2012/03/07/using-nginx-as-a-caching-proxy-in-front-of-wordpress/</guid><description>Why you may want to use Nginx as a caching reverse-proxy in front of Apache for Wordpress, and config examples for doing so.</description></item><item><title>Load balancing in EC2 with Nginx and HAProxy</title><link>https://evan.wtf/2012/01/09/load-balancing-in-ec2-with-nginx-and-haproxy/</link><pubDate>Mon, 09 Jan 2012 17:00:22 +0000</pubDate><guid>https://evan.wtf/2012/01/09/load-balancing-in-ec2-with-nginx-and-haproxy/</guid><description>&lt;p&gt;We wanted to setup a loadbalanced web cluster in AWS for expansion. My first inclination was to use &lt;a href="http://aws.amazon.com/elasticloadbalancing/"&gt;ELB&lt;/a&gt; for this, but I soon learned that ELB doesn&amp;rsquo;t let you allocate a static IP, requiring you to refer to it only by DNS name. This would be OK except for the fact that our current DNS provider, &lt;a href="http://dyn.com/dns/dynect-managed-dns/"&gt;Dyn&lt;/a&gt;, requires IP addresses when using their GSLB (geo-based load balancer) service.&lt;/p&gt;&#10;&lt;p&gt;Rather than let this derail the whole project, I decided to look into the software options available for loadbalancing in EC2. I&amp;rsquo;ve been a fan of hardware load balancers for a while, sort of looking down at software-based solutions without any real rationale, but in this case I really had no choice so I figured I&amp;rsquo;d give it a try.&lt;/p&gt;</description></item><item><title>Making sure SSLv2 is disabled in Apache (and Nginx)</title><link>https://evan.wtf/2011/09/20/making-sure-sslv2-is-disabled-in-apache/</link><pubDate>Tue, 20 Sep 2011 14:06:38 +0000</pubDate><guid>https://evan.wtf/2011/09/20/making-sure-sslv2-is-disabled-in-apache/</guid><description>&lt;p&gt;&lt;strong&gt;Edit Jan 24, 2012:&lt;/strong&gt; Deleted all the crap from this story and just left the recommended Apache and Nginx SSL cipher suites for maximum security without SSLv2 and without BEAST vulnerability (at least according to Qualys).&#10;&lt;strong&gt;Apache httpd&lt;/strong&gt;&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;SSLProtocol -ALL +SSLv3 +TLSv1&#10;SSLCipherSuite ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM;&#10;SSLHonorCipherOrder on&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;nginx&lt;/strong&gt;&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;ssl_protocols SSLv3 TLSv1;&#10; ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM;&#10; ssl_prefer_server_ciphers on;&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Source:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://community.qualys.com/blogs/securitylabs/2011/10/17/mitigating-the-beast-attack-on-tls"&gt;Qualys&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://www.ssllabs.com/ssldb/"&gt;SSL checker&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;a href="http://affiliate.godaddy.com/redirect/5F43C3ECBA841ACFC3859F4F4E6CA7DA64C271385B2D61A3AD6F3CCE83EB1DD8235E60DCD7D63BCD92E2429E79A75FAC"&gt;&lt;img src="http://affiliate.godaddy.com/ads/5F43C3ECBA841ACFC3859F4F4E6CA7DA64C271385B2D61A3AD6F3CCE83EB1DD8235E60DCD7D63BCD92E2429E79A75FAC" alt="Go Daddy $12.99 SSL Sale!"&gt;&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>