<?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>Never Use This Font &#187; apache</title>
	<atom:link href="http://neverusethisfont.com/blog/tags/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://neverusethisfont.com/blog</link>
	<description>Aaron Parecki is the co-founder of Geoloqi.com, and specializes in backend systems development.</description>
	<lastBuildDate>Mon, 11 Jul 2011 22:50:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Tracking typos of your domain name in Google Analytics</title>
		<link>http://neverusethisfont.com/blog/2010/12/tracking-typos-of-your-domain-name-in-google-analytics/</link>
		<comments>http://neverusethisfont.com/blog/2010/12/tracking-typos-of-your-domain-name-in-google-analytics/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 17:41:53 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server Software]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[redirection]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://neverusethisfont.com/blog/?p=279</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>Say you want to register a couple different typos of your domain name, and redirect everyone seamlessly to the correct site. This can be done quite easily in Apache using ServerAlias and a simple RewriteRule. I just registered geoloqui.com after noticing a couple articles linking to it instead of geoloqi.com. But then I thought, wouldn&#8217;t it be useful if I could track these typos and see which ones are most common? Turns out it&#8217;s not difficult! </p>
<p>Here is a snippet of my virtual hosts definition for geoloqi.com:</p>
<pre>
&lt;VirtualHost *:80&gt;
	ServerName geoloqi.com
	ServerAlias *.geoloqi.com
	ServerAlias geoloqui.com
	ServerAlias *.geoloqui.com

	RewriteEngine on
	RewriteCond %{HTTP_HOST} !^geoloqi.com
	RewriteRule ^/(.*)$ http://geoloqi.com/$1?utm_source=DomainRedirect&#038;utm_medium=%{HTTP_HOST} [R=permanent,L]
...
</pre>
<p>This will make domain typos visible in Google Analytics under the &#8220;All Traffic Sources&#8221; section. You can clearly see the referrals from the typo&#8217;d domain name at the bottom of this list.</p>
<p><img src="http://neverusethisfont.com/blog/wp-content/uploads/2010/12/referrers_-_fake.png" alt="" title="geoloqi.com traffic sources" width="522" height="348" class="aligncenter size-full wp-image-282" /></p>
<p>You could also use the filter box to search for &#8220;DomainRedirect&#8221; and see only the typos. </p>
<p>I&#8217;d be curious to know if anybody else has other suggestions for tracking this type of thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://neverusethisfont.com/blog/2010/12/tracking-typos-of-your-domain-name-in-google-analytics/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Trouble restarting Apache</title>
		<link>http://neverusethisfont.com/blog/2006/04/trouble-restarting-apache/</link>
		<comments>http://neverusethisfont.com/blog/2006/04/trouble-restarting-apache/#comments</comments>
		<pubDate>Thu, 20 Apr 2006 05:57:41 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Server Software]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://blog.neverusethisfont.com/2006/04/trouble-restarting-apache/</guid>
		<description><![CDATA[My VPS was restarted yesterday, and apparently Apache wasn&#8217;t shut down gracefully. I tried to go to my website, but Apache wasn&#8217;t running. I SSH&#8217;d into my machine to restart apache. I typed /etc/init.d/httpd restart I can&#8217;t remember exactly what it said back to me, but it gave me the PID of Apache (1039) and [...]]]></description>
			<content:encoded><![CDATA[<p>My VPS was restarted yesterday, and apparently Apache wasn&#8217;t shut down gracefully. I tried to go to my website, but Apache wasn&#8217;t running. I SSH&#8217;d into my machine to restart apache. I typed </p>
<blockquote class="code"><p>/etc/init.d/httpd restart</p></blockquote>
<p>I can&#8217;t remember exactly what it said back to me, but it gave me the <a href="http://en.wikipedia.org/wiki/Process_identifier" >PID</a> of Apache (1039) and said it was running. Apache was most definitely not running. I found this out by getting a list of all running processes:</p>
<blockquote class="code"><p>ps -ax</p></blockquote>
<p>That gave me a list of PIDs corresponding to programs, and 1039 was not httpd. It occurred to me that if Apache thinks it&#8217;s running, it has to have some way of knowing that. In Apache&#8217;s log file directory, there is a file which holds the PID of Apache when it&#8217;s running. That file is called httpd.pid. By removing that file, Apache no longer thinks it&#8217;s already running, and will actually try to start. If you don&#8217;t know where httpd.pid is, run this command:</p>
<blockquote class="code"><p>whereis httpd.pid</p></blockquote>
<p>That should find it. If not, it is probably in /usr/local/apache2/logs if you installed with the default values. Then you just need to rm httpd.pid, and restart apache again. I got everything back up and running with just under 10 minutes of troubleshooting!</p>
]]></content:encoded>
			<wfw:commentRss>http://neverusethisfont.com/blog/2006/04/trouble-restarting-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

