<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Life and Times of Michael Shadle &#187; nginx</title>
	<atom:link href="http://michaelshadle.com/category/nginx-software/feed/" rel="self" type="application/rss+xml" />
	<link>http://michaelshadle.com</link>
	<description>&#34;Sometimes I don&#039;t know why I even fucking try&#34;</description>
	<lastBuildDate>Sat, 31 Jul 2010 04:31:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>nginx and Go Daddy SSL certificates</title>
		<link>http://michaelshadle.com/2010/07/15/nginx-and-godaddy-ssl-certificates/</link>
		<comments>http://michaelshadle.com/2010/07/15/nginx-and-godaddy-ssl-certificates/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 21:30:23 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://michaelshadle.com/?p=420</guid>
		<description><![CDATA[Generate the CSR: openssl genrsa 2048 > yourhost.com.key openssl req -new -key yourhost.com.key > yourhost.com.csr Enter in whatever you want - you NEED the "Common Name" everything else is not really required for it to work. Country Name (2 letter code) [AU]:US State or Province Name (full name) [Some-State]:. Locality Name (eg, city) []:. Organization [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Generate the CSR:
<pre class="brush: plain">
openssl genrsa 2048 > yourhost.com.key
openssl req -new -key yourhost.com.key > yourhost.com.csr
</pre>
</li>
<li>Enter in whatever you want - you NEED the "Common Name" everything else is not really required for it to work.
<pre class="brush: plain">Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:.
Locality Name (eg, city) []:.
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Something Here
Organizational Unit Name (eg, section) []:.
Common Name (eg, YOUR name) []:yourhost.com
Email Address []:.

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
</pre>
</li>
<li>Paste the CSR into Go Daddy, get back the .crt file</li>
<li>Combine the cert + Go Daddy chain:
<pre class="brush: plain">cat yourhost.com.crt gd_bundle.crt > yourhost.com.pem</pre>
</li>
<li>Lastly, in nginx.conf:
<pre class="brush: plain">
ssl_certificate /etc/nginx/certs/yourhost.com.pem;
ssl_certificate_key /etc/nginx/certs/yourhost.com.key;
</pre>
</li>
</ol>
<p>Additionally I have these SSL tweaks which seems to maintain a better SSL experience, passes McAfee Secure's SSL checks, etc.:</p>
<pre class="brush: plain">
ssl on;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:-ADH:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP;
ssl_session_cache shared:SSL:10m;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://michaelshadle.com/2010/07/15/nginx-and-godaddy-ssl-certificates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP-FPM and nginx upstart scripts</title>
		<link>http://michaelshadle.com/2010/05/21/php-fpm-and-nginx-upstart-scripts/</link>
		<comments>http://michaelshadle.com/2010/05/21/php-fpm-and-nginx-upstart-scripts/#comments</comments>
		<pubDate>Fri, 21 May 2010 09:17:51 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP-FPM]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://michaelshadle.com/?p=377</guid>
		<description><![CDATA[Upstart is becoming the de-facto standard for everything in Ubuntu, and I do enjoy it's process management and re-spawning capabilities. (Actually, before PHP-FPM I used to use upstart jobs to su - $user php-cgi -b $port ) These are VERY simple but effective scripts, and would actually be beefed up to be more intelligent (chaining [...]]]></description>
			<content:encoded><![CDATA[<p>Upstart is becoming the de-facto standard for everything in Ubuntu, and I do enjoy it's process management and re-spawning capabilities.</p>
<p>(Actually, before PHP-FPM I used to use upstart jobs to su - $user php-cgi -b $port <img src='http://michaelshadle.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
<p>These are VERY simple but effective scripts, and would actually be beefed up to be more intelligent (chaining nginx to start after PHP-FPM for example. However, if you do not need PHP, then that's a useless chain. So I kept it simple. I suppose you could add a short delay to start nginx then...)</p>
<p>Note: make sure PHP-FPM is set to daemonized = yes.</p>
<p>Second note: this works for <a href="http://php-fpm.org/download/" target="_blank">PHP 5.2.x w/ the PHP-FPM patch</a>, on Ubuntu Lucid Lynx (10.04) - anything else YMMV. I am not using PHP-FPM w/ PHP 5.3 yet since I have no environments that I know will support 5.3 code. When I finally get one, I will look for the same opportunity.</p>
<p>/etc/init/nginx.conf:</p>
<pre class="brush: plain">
description "nginx"

start on (net-device-up and local-filesystems)
stop on runlevel [016]

expect fork
respawn
exec /usr/sbin/nginx
</pre>
<p>/etc/init/php-fpm.conf:</p>
<pre class="brush: plain">
description "PHP FastCGI Process Manager"

start on (net-device-up and local-filesystems)
stop on runlevel [016]

expect fork
respawn
exec /usr/local/bin/php-cgi --fpm --fpm-config /etc/php-fpm.conf
</pre>
<p>Once you've done this you can remove all the /etc/init.d/php-fpm, /etc/init.d/nginx and /etc/rc?.d/[K,S]??php-fpm and /etc/rc?.d/[K,S]??nginx symlinks and files. This takes care of all of that.</p>
<p>Feel free to comment and leave better tips, tricks and ideas!</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelshadle.com/2010/05/21/php-fpm-and-nginx-upstart-scripts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SPNEGO For nginx - a start, at least</title>
		<link>http://michaelshadle.com/2010/01/17/spnego-for-nginx-a-start-at-least/</link>
		<comments>http://michaelshadle.com/2010/01/17/spnego-for-nginx-a-start-at-least/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 22:42:40 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://michaelshadle.com/?p=254</guid>
		<description><![CDATA[I've been posting on the nginx mailing lists for a while that I've had a developer working on SPNEGO (Kerberos/GSSAPI/etc.) module for authentication for nginx. I never produced any code though, because I was constantly waiting for a bit more of a matured module before giving it out. For now though, it might just be [...]]]></description>
			<content:encoded><![CDATA[<p>I've been posting on the nginx mailing lists for a while that I've had a developer working on SPNEGO (Kerberos/GSSAPI/etc.) module for authentication for nginx. I never produced any code though, because I was constantly waiting for a bit more of a matured module before giving it out.</p>
<p>For now though, it might just be best to throw out there what I have, explain my findings, and let the community start testing it, hacking it, improving it, etc.</p>
<p><strong>Download</strong><br />
<a href="http://michaelshadle.com/media/ngx_http_auth_sso_module-0.3.zip">http://michaelshadle.com/media/ngx_http_auth_sso_module-0.3.zip</a></p>
<p><strong>Opens for the developer still</strong></p>
<ul>
<li>He said he'd like to remove the dependency on the bundled spnegohelp library (apparently it's not needed or it can be filled with a system package)</li>
<li>Needs some more documentation</li>
</ul>
<p><strong>My questions, comments</strong></p>
<ul>
<li>Should it be called "mod_auth_sso" or something like "mod_auth_gssapi" - I believe Apache's equivalent has "gssapi" in the title somewhere. It was hard to determine which was the most up to date version - <a href="http://modauthkerb.sourceforge.net/" target="_blank">mod_auth_kerb</a>, <a href="http://osdir.com/ml/encryption.kerberos.general/2003-09/msg00019.html" target="_blank">modgssapache</a>, etc.</li>
<li>I cannot verify this still using my corporate domain setup. I did have to make a minor tweak in the source to change the principal name it was using (see below) and I still got access denied. I have no clue if the module is to blame, the machine's setup with the domain, or what.</li>
</ul>
<p><strong>A possible required tweak... around line 474 or so in ngx_http_auth_sso_module.c</strong></p>
<pre class="brush: plain">
- host_name = r-&gt;headers_in.host-&gt;value;
+ host_name = alcf-&gt;realm;</pre>
<p><strong>How to compile - yes, it's a bit messy, mainly due to the spnegohelp library dependency <img src='http://michaelshadle.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>
<pre class="brush: plain">
wget http://sysoev.ru/nginx/nginx-0.8.31.tar.gz
tar xvfz nginx-0.8.31.tar.gz
cd nginx-0.8.31
./configure --conf-path=/etc/nginx/nginx.conf --prefix=/usr --user=www-data --group=www-data --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-http_stub_status_module --with-http_gzip_static_module --without-mail_pop3_module --without-mail_smtp_module --without-mail_imap_module --with-http_flv_module --with-http_ssl_module --with-http_dav_module --with-http_realip_module --with-http_xslt_module --with-debug --add-module=/usr/src/build/ngx_http_auth_sso_module-current --with-ld-opt="-L/usr/src/build/ngx_http_auth_sso_module-current/spnegohelp"
cp -f /usr/src/build/ngx_http_auth_sso_module-0.3/spnegohelp/libspnegohelp.so /usr/lib64/libspnegohelp.so
... make, make install, whatever ...</pre>
<p>I copied the libspnegohelp.so into the system so nginx can use it without any special runtime LD_LIBRARY_PATH crap.</p>
<p><strong>How to configure (again, I could not validate this 100%)</strong></p>
<pre class="brush: plain">
location /test {
   auth_gss on;
   auth_gss_realm YOUR.KERBEROS.REALM;
   auth_gss_keytab /etc/krb5.keytab;
   auth_gss_service_name YOURMACHINENAMEIBELIEVE;
}</pre>
<p><strong>Conclusion</strong><br />
Your mileage will definitely vary but hopefully some people with more experience with Kerberos, C, nginx modules, or anything else helpful can pick it apart. I will post updates as I get them and I do want to post this on github or something... unless someone else wants to take ownership over it who will actually actively maintain/keep it up to date with nginx internals and maintain the github/whatever repository for it.</p>
<p>This was self-funded personally with no company sponsorship or anything, part of the terms of the project were also to keep it BSD licensed. Feel free to do whatever you want with it. If you want to send me any money to reimburse, I'll never say no to that - paypal AT mike2k.com. Or, pay a developer who can ensure it works end-to-end, if there is something missing.</p>
<p>Sadly, it does require the machine to be on the domain, I was hoping I could get away with it not having to be on the domain. I confirmed with Sam Hartman, who was a chief technologist at the MIT Kerberos Consortium - you can't really get more knowledgeable than that. I would have hired Sam for the project but it would have been too expensive. However if a company is willing to take this initial coding and have Sam add his magic to it, he knows C and was able to give me a real quick estimate and check how nginx modules work. He could possibly do it for cheaper now since the initial work might be done, and he would definitely be able to confirm all the logic is intact.</p>
<p>Thanks to YoctoPetaBorg at RentACoder.com for the initial work (and for hopefully soon finishing up the last bits of this :p) - it will be exciting to be able to use this at work and be able to have a fully functional module out there that people find useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelshadle.com/2010/01/17/spnego-for-nginx-a-start-at-least/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Transifex + Django + nginx on Ubuntu</title>
		<link>http://michaelshadle.com/2009/11/01/transifex-django-nginx-on-ubuntu/</link>
		<comments>http://michaelshadle.com/2009/11/01/transifex-django-nginx-on-ubuntu/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 00:05:41 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://michaelshadle.com/?p=234</guid>
		<description><![CDATA[You can probably also use this for just Django + nginx on Ubuntu too, it should work the same for any Django-based package, just change the Transifex-specific stuff (like /site_media and such.) Dependencies: python-django package from Ubuntu (currently Jaunty's 1.0.2-1ubuntu0.1) Transifex installed to /home/transifex/web/transifex, from source Transifex setup to answer over fastcgi on port 8080 [...]]]></description>
			<content:encoded><![CDATA[<p>You can probably also use this for just Django + nginx on Ubuntu too, it should work the same for any Django-based package, just change the Transifex-specific stuff (like /site_media and such.)</p>
<p><strong>Dependencies:</strong>
<ul>
<li>python-django package from Ubuntu (currently Jaunty's 1.0.2-1ubuntu0.1)
</li>
<li>Transifex installed to /home/transifex/web/transifex, from source
</li>
<li>Transifex setup to answer over fastcgi on port 8080
</li>
<li>Tested on nginx 0.7.x and 0.8.x compiled from source
</li>
</ul>
<p><strong>/etc/nginx/nginx.conf:</strong></p>
<pre class="brush: plain">server {
   listen 80;
   server_name foo.com;
   include /etc/nginx/confs/defaults.conf;
   location / {
      fastcgi_pass 127.0.0.1:8080;
      include /etc/nginx/confs/django.conf;
   }
   location /site_media {
      root /home/transifex/web/transifex;
      include /etc/nginx/confs/expires.conf;
   }
   location /media {
      root /usr/share/python-support/python-django/django/contrib;
      include /etc/nginx/confs/expires.conf;
   }
}</pre>
<p><strong>/etc/nginx/confs/defaults.conf:</strong></p>
<pre class="brush: plain">location ~ /\.ht {
   deny all;
}

location ~ \.svn {
   deny all;
}

log_not_found off;
server_name_in_redirect off;</pre>
<p><strong>/etc/nginx/confs/django.conf:</strong></p>
<pre class="brush: plain"># http://www.rkblog.rk.edu.pl/w/p/django-nginx/
# http://code.djangoproject.com/wiki/ServerArrangements
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;</pre>
<p><strong>/etc/nginx/confs/expires.conf:</strong></p>
<pre class="brush: plain">location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
   expires max;
   access_log off;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://michaelshadle.com/2009/11/01/transifex-django-nginx-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#039;t forget the $args!</title>
		<link>http://michaelshadle.com/2009/05/15/dont-forget-the-args/</link>
		<comments>http://michaelshadle.com/2009/05/15/dont-forget-the-args/#comments</comments>
		<pubDate>Fri, 15 May 2009 21:29:04 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://michaelshadle.com/?p=169</guid>
		<description><![CDATA[I just realized when trying to use the try_files shortcut that either the behavior has changed or the code I've used it for has never had to take advantage of it, but what happens when you do something like this: try_files $uri $uri/ /foo/index.php?u=$uri; Is that the query string is stripped out and the only [...]]]></description>
			<content:encoded><![CDATA[<p>I just realized when trying to use the try_files shortcut that either the behavior has changed or the code I've used it for has never had to take advantage of it, but what happens when you do something like this:</p>
<pre class="brush: plain">
try_files $uri $uri/ /foo/index.php?u=$uri;
</pre>
<p>Is that the query string is stripped out and the only thing PHP sees is the $_GET['u']</p>
<p>to fix this, it's easy enough:</p>
<pre class="brush: plain">
try_files $uri $uri/ /foo/index.php?u=$uri&$args;
</pre>
<p>I never noticed this behavior in WordPress (I've been using try_files with it for a while without noticable issue) but it was an issue with Drupal (which uses the Front-Controller Pattern just like WP does) and custom code we've written.</p>
<p>UPDATE: depending on what custom WordPress plugins you may be using that rely on the $_GET params, you should add this. This should be the final recipe from what I can tell. <img src='http://michaelshadle.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I haven't asked Igor if the behavior has changed slightly with it, but the changelogs have not mentioned any behavior changes, from what I can tell.</p>
<p>Anyway if you notice your pagination or other GET params are being dropped, you might want to take a quick look at that <img src='http://michaelshadle.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://michaelshadle.com/2009/05/15/dont-forget-the-args/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Finally using nginx&#039;s &quot;try_files&quot; directive</title>
		<link>http://michaelshadle.com/2009/03/19/finally-using-nginxs-try-files-directive/</link>
		<comments>http://michaelshadle.com/2009/03/19/finally-using-nginxs-try-files-directive/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 04:29:50 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://michaelshadle.com/?p=155</guid>
		<description><![CDATA[OLD: error_page 404 = /wordpress/index.php?q=$request_uri; or: if (!-e $request_filename) { rewrite ^/(.*) /wordpress/index.php?uri=$request_uri last; } NEW: try_files $uri $uri/ /wordpress/index.php?q=$uri&$args; Why make life more complicated if you don't need to? Also thanks to Igor's patch you can have multiple of these, i.e.: location /wordpress { try_files $uri $uri/ /wordpress/index.php?q=$uri&$args; } location /anotherapp { try_files $uri [...]]]></description>
			<content:encoded><![CDATA[<p>OLD:</p>
<pre class="brush: plain">
error_page 404 = /wordpress/index.php?q=$request_uri;
</pre>
<p>or:</p>
<pre class="brush: plain">
if (!-e $request_filename) {
   rewrite ^/(.*) /wordpress/index.php?uri=$request_uri last;
}
</pre>
<p>NEW:</p>
<pre class="brush: plain">
try_files $uri $uri/ /wordpress/index.php?q=$uri&$args;
</pre>
<p>Why make life more complicated if you don't need to?</p>
<p>Also thanks to Igor's patch you can have multiple of these, i.e.:</p>
<pre class="brush: plain">
location /wordpress {
   try_files $uri $uri/ /wordpress/index.php?q=$uri&$args;
}

location /anotherapp {
   try_files $uri $uri/ /anotherapp/controllerfile.php?q=$uri&$args;
}
</pre>
<p>etc.</p>
<p>This is good, as Drupal, WordPress and many other packages (including anything I develop anymore) use the <a href="http://en.wikipedia.org/wiki/Front_controller">Front Controller pattern</a> of development, which makes deploying applications a lot simpler and helps support a consistent framework across the entire application.</p>
<p>NOTE: Updated on 1/5/10 to include the $args <img src='http://michaelshadle.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://michaelshadle.com/2009/03/19/finally-using-nginxs-try-files-directive/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>nginx hits #4 on Netcraft</title>
		<link>http://michaelshadle.com/2008/12/31/nginx-hits-4-on-netcraft/</link>
		<comments>http://michaelshadle.com/2008/12/31/nginx-hits-4-on-netcraft/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 21:28:25 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://michaelshadle.com/?p=153</guid>
		<description><![CDATA[Self-explanatory. nginx surpasses Lighttpd and moves up to #4 according to Netcraft. Woohoo! http://survey.netcraft.com/Reports/200812/]]></description>
			<content:encoded><![CDATA[<p>Self-explanatory. nginx surpasses Lighttpd and moves up to #4 according to Netcraft. Woohoo!</p>
<p><a href="http://survey.netcraft.com/Reports/200812/">http://survey.netcraft.com/Reports/200812/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://michaelshadle.com/2008/12/31/nginx-hits-4-on-netcraft/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Who ever said open source software was perfect?</title>
		<link>http://michaelshadle.com/2008/12/14/who-ever-said-open-source-software-was-perfect/</link>
		<comments>http://michaelshadle.com/2008/12/14/who-ever-said-open-source-software-was-perfect/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 07:58:15 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://michaelshadle.com/?p=143</guid>
		<description><![CDATA[Typically, updates on the open source packages work without a hitch. However, my upgrade last weekend on my servers from Ubuntu Hardy to Intrepid wound up creating a couple major headaches, and at the same time, I noticed a handful of other snafoos happening to open source packages I use daily. This wound up in [...]]]></description>
			<content:encoded><![CDATA[<p>Typically, updates on the open source packages work without a hitch. However, my upgrade last weekend on my servers from Ubuntu Hardy to Intrepid wound up creating a couple major headaches, and at the same time, I noticed a handful of other snafoos happening to open source packages I use daily.</p>
<p>This wound up in server instability, client annoyance, and 20-30 hours solid of trial-and-error compiling, testing, debugging, etc. Even right now, if I forget to hold back the libgpac-dev package from being updated, all videos being converted lose their sound due to MP4Box crashing.</p>
<ul>
<li>NFS broke - on only *one* of six identically configured machines. For the time being, running 2.6.24-16-server has been my only workaround. Trying all three kernels in the Ubuntu repository (2.6.27-7-server, 2.6.27-10-server, and 2.6.28-2-server) all suffered from this issue. Sadly, could not provide much debugging or relevant information to anyone, the machine is in production and I've got nothing in logs to go off of. Five of the six servers are running the newer kernels without an issue, which is what is odd.</li>
<li><a href="https://roundup.mplayerhq.hu/roundup/ffmpeg/issue582" target="_blank">ffmpeg broke resampling of a common audio type</a> - oddly enough, this can be fixed by issuing two separate ffmpeg commands. There is a patch on the mailing list, but still not implemented into SVN.</li>
<li><a href="https://bugs.launchpad.net/ubuntu/+source/gpac/+bug/273075" target="_blank">MP4Box no longer works on Ubuntu, due to an issue with libgpac-dev</a> - still no fix available, have to force using an older libgpac-dev version.</li>
<li><a href="http://marc.info/?l=nginx&#038;m=122876198811574&#038;w=2" target="_blank">nginx releases 0.7.25, a new feature in 0.7.25 had a bug, 0.7.26 comes out</a> - luckily, Igor's fix was quick and effective, before I even had a chance to run 0.7.25.</li>
<li><a href="http://www.php.net/releases/5_2_8.php" target="_blank">PHP 5.2.7 comes out with a somewhat critical "security" issue (magic quotes was broken), has to release 5.2.8 shortly after</a> - I have to wait for Suhosin and PHP-FPM patches before I can adopt a new version of PHP; otherwise, this may have caused some headache for me.</li>
<li><a href="http://monty-says.blogspot.com/2008/11/oops-we-did-it-again-mysql-51-released.html" target="_blank">MySQL 5.1 comes out with crashing bugs</a> - I stick to using MySQL from the standard Ubuntu repositories, which usually has a decent lag while seeking "stability" - thank God for that.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://michaelshadle.com/2008/12/14/who-ever-said-open-source-software-was-perfect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nginx + WordPress - redux</title>
		<link>http://michaelshadle.com/2008/08/17/nginx-wordpress-redux/</link>
		<comments>http://michaelshadle.com/2008/08/17/nginx-wordpress-redux/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 09:52:48 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://michaelshadle.com/?p=76</guid>
		<description><![CDATA[Note: this has been outdated once again. Now it can be simplified with one simple directive shown here. There's been a minor tweak required in my original WordPress+nginx rewrite rule post. I think we've finally got it right now. I've been exchanging emails ad nauseum with Igor and I believe the behavior now works properly [...]]]></description>
			<content:encoded><![CDATA[<p>Note: this has been outdated once again. Now it can be simplified with one simple directive shown <a href="http://michaelshadle.com/2009/03/19/finally-using-nginxs-try-files-directive/">here</a>.</p>
<p><strike><br />
There's been a minor tweak required in my <a href="http://michaelshadle.com/2008/05/01/wordpress-nginx-rewrite-rules-stop-the-insanity/">original WordPress+nginx rewrite rule post</a>.</p>
<p>I think we've finally got it right now. I've been exchanging emails ad nauseum with Igor and I believe the behavior now works properly (part of the exchange was regarding PHP+basic http auth, there were some bugs around the regexps/nested location blocks or something)</p>
<p>Anyway, here is a perfect working example, running this very website:</p>
<pre class="brush: plain">server {
   listen 80;
   server_name michaelshadle.com;
   index index.php;
   root /home/mike/web/michaelshadle.com/;
   include /etc/nginx/defaults.conf;
   include /etc/nginx/expires.conf;
   error_page 404 = /wordpress/index.php?q=$request_uri;
   location ^~ /wordpress/wp-admin {
      auth_basic "wordpress";
      auth_basic_user_file /home/mike/web/michaelshadle.com/.htpasswd;
      location ~ \.php$ {
         fastcgi_pass 127.0.0.1:11000;
      }
   }
   location ~ \.php$ {
      fastcgi_pass 127.0.0.1:11000;
   }
}
</pre>
<p>Likewise, you can also omit the basic HTTP authentication if you don't think you need it:</p>
<pre class="brush: plain">
server {
   listen 80;
   server_name michaelshadle.com;
   index index.php;
   root /home/mike/web/michaelshadle.com/;
   include /etc/nginx/defaults.conf;
   include /etc/nginx/expires.conf;
   error_page 404 = /wordpress/index.php?q=$request_uri;
   location ~ \.php$ {
      fastcgi_pass 127.0.0.1:11000;
   }
}</pre>
<p>Note: this does require a patched version of 0.7.10 - I assume he will put these changes into 0.7.11. Some of the changes required include the basic HTTP auth stuff. Also, when using error_page 404, it generated logfile noise in the error log. That was fixed as of 0.7.9 or 0.7.10, so no longer will you receive script-handled 404's in your error log.</p>
<p>This should be the last and final need to run WordPress properly under nginx. This has the approval of Igor, the creator - you cannot get better than that. (Note: this is WordPress 2.6.1, but I have not seen any reason the rewrite rule would be different since even before 2.x)</p>
<p>Let me know if it doesn't work! Or better yet, let the <a href="http://wiki.codemongers.com/MailinglistSubscribe" target="_blank">nginx mailing list</a> know <img src='http://michaelshadle.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
</strike></p>
]]></content:encoded>
			<wfw:commentRss>http://michaelshadle.com/2008/08/17/nginx-wordpress-redux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress+nginx rewrite rules - stop the insanity!</title>
		<link>http://michaelshadle.com/2008/05/01/wordpress-nginx-rewrite-rules-stop-the-insanity/</link>
		<comments>http://michaelshadle.com/2008/05/01/wordpress-nginx-rewrite-rules-stop-the-insanity/#comments</comments>
		<pubDate>Thu, 01 May 2008 16:00:20 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[nginx rewrite rules wordpress mod_rewrite]]></category>

		<guid isPermaLink="false">http://michaelshadle.com/2008/05/01/wordpress-nginx-rewrite-rules-stop-the-insanity/</guid>
		<description><![CDATA[Note: this has been outdated now. I have an updated post with the latest and Igor-approved method here. When I was switching over to nginx, I found a handful of random and overkill config examples to make it work. I thought I had found the simplest solution already, but Igor (the creator of nginx) actually [...]]]></description>
			<content:encoded><![CDATA[<p>Note: this has been outdated now. I have an updated post with the latest and Igor-approved method <a href="http://michaelshadle.com/2008/08/17/nginx-wordpress-redux/">here</a>.</p>
<p><strike>When I was switching over to nginx, I found a handful of random and overkill config examples to make it work. I thought I had found the simplest solution already, but Igor (the creator of nginx) actually gave me an even "better" solution in nginx.</p>
<p>This is assuming WordPress is physically installed in /wordpress, and pages are served up using friendly URLs, /2008/02/03/post-title/ - just like this site. All the rewrites are off the root. I assume you've already got PHP setup to parse properly and you have a working server {} block. I'll post that info too if people really need it.</p>
<p>1st example (seems like overkill, can't figure out a reason why people are splitting up the rewrite rules - I guess because they assume "wp-anything" is all static?):</strike></p>
<pre class="brush: plain">
if (!-e $request_filename) {
   rewrite ^([_0-9a-zA-Z-]+)?(/wp-.*) $2  break;
   rewrite ^([_0-9a-zA-Z-]+)?(/.*\.php)$ $2 last;
   rewrite ^ /index.php last;
}
</pre>
<p><strike>2nd example (this was as good as I thought it could be, but I was wrong):</strike></p>
<pre class="brush: plain">
if (!-e $request_filename) {
   rewrite ^(.+)$ /wordpress/index.php?q=$1 last;
}
</pre>
<p><strike>3rd example (this is the best, according to Igor):</strike></p>
<pre class="brush: plain">
error_page 404 = /wordpress/index.php?q=$uri;
</pre>
<p><strike>(Ref: <a href="http://article.gmane.org/gmane.comp.web.nginx.english/4739">http://article.gmane.org/gmane.comp.web.nginx.english/4739</a>)</strike></p>
]]></content:encoded>
			<wfw:commentRss>http://michaelshadle.com/2008/05/01/wordpress-nginx-rewrite-rules-stop-the-insanity/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
