<?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>Tak79</title>
	<atom:link href="http://tak79.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tak79.com</link>
	<description>It&#039;s what it is</description>
	<lastBuildDate>Mon, 30 Apr 2012 08:04:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>nginx redirect www URL requests to http URL</title>
		<link>http://tak79.com/nginx-redirect-www-url-requests-to-http-url/</link>
		<comments>http://tak79.com/nginx-redirect-www-url-requests-to-http-url/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 13:45:10 +0000</pubDate>
		<dc:creator>Tak</dc:creator>
				<category><![CDATA[code abode]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://tak79.com/?p=26</guid>
		<description><![CDATA[You can add this in your nginx config, in a server block. Anyone using www in the URL will have it removed for them. We also follow rewrite rules http://wiki.nginx.org/Pitfalls#Taxing_Rewrites]]></description>
			<content:encoded><![CDATA[<p>You can add this in your nginx config, in a server block. Anyone using www in the URL will have it removed for them. We also follow rewrite rules <img src='http://tak79.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
<a href="http://wiki.nginx.org/Pitfalls#Taxing_Rewrites" target="_blank">http://wiki.nginx.org/Pitfalls#Taxing_Rewrites</a></p>
<pre class="brush: php; title: ; notranslate">server {
    server_name www.mydomain.com;
    rewrite ^ http://mydomain.com$request_uri? permanent;
}
// end rewrite
server {
server_name mydomain.com;
...
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://tak79.com/nginx-redirect-www-url-requests-to-http-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MediaWiki &amp; Nginx using short URLs</title>
		<link>http://tak79.com/mediawiki-nginx-using-short-urls/</link>
		<comments>http://tak79.com/mediawiki-nginx-using-short-urls/#comments</comments>
		<pubDate>Sat, 07 Apr 2012 09:20:17 +0000</pubDate>
		<dc:creator>Tak</dc:creator>
				<category><![CDATA[code abode]]></category>
		<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://tak79.com/?p=1</guid>
		<description><![CDATA[I wanted to use a short URL in a mediawiki install, eg; <em>www.mywiki.com/article-name</em>.
I've installed the mediawiki script in the root folder of my website. The LocalSettings.php file contains the relevant info;]]></description>
			<content:encoded><![CDATA[<p>I wanted to use a short URL in a mediawiki install, eg; <strong><em>www.mywiki.com/article-name</em></strong>.<br />
I&#8217;ve installed the mediawiki script in the root folder of my website. The LocalSettings.php file contains the relevant info;</p>
<pre class="brush: php; title: ; notranslate">
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath       = &quot;&quot;;
$wgScriptExtension  = &quot;.php&quot;;
$wgArticlePath = '/$1';
$wgUsePathInfo = true;
</pre>
<p>Your mileage may vary but you&#8217;d need a similar config as below for nginx.<br />
<a href="http://wiki.nginx.org/MediaWiki" target="_blank">http://wiki.nginx.org/MediaWiki</a></p>
<pre class="brush: php; title: ; notranslate">

        server {
        # rewrite from www.example.com to example.com
        server_name www.gorewiki.com;
        rewrite ^(.*) http://yourwiki.com$1 permanent;
        }

        server {
        server_name www.yourwiki.com;
        root /srv/www/yourwiki.com/public_html;
        index index.php index.html;
        client_max_body_size 5m;
        client_body_timeout 60;

        location / {
         try_files $uri $uri/ @rewrite;
        }

        location @rewrite {
        rewrite ^/(.*)$ /index.php?title=$1&amp;$args;
        }

        location ^~ /maintenance/ {
                return 403;
        }

        location ~ \.php$ {
        include fastcgi_params;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }

        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                try_files $uri /index.php;
                expires max;
                log_not_found off;
        }

        location = /_.gif {
                expires max;
                empty_gif;
        }

        location ^~ /cache/ {
                deny all;
        }
    }
</pre>
<p>After restarting nginx all works well with our &#8220;pretty&#8221; short URL structure on the wiki.</p>
]]></content:encoded>
			<wfw:commentRss>http://tak79.com/mediawiki-nginx-using-short-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using disk: enhanced
Object Caching 247/267 objects using apc

Served from: tak79.com @ 2012-05-20 18:48:12 -->
