<?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"
	>

<channel>
	<title>DustinsDesign.com &#187; Server Administration</title>
	<atom:link href="http://www.dustinsdesign.com/category/internet/server-administration/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dustinsdesign.com</link>
	<description>Blog by web developer, online marketer and entrepreneur Dustin Czysz</description>
	<pubDate>Fri, 07 Nov 2008 21:02:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Changing back to default permissions</title>
		<link>http://www.dustinsdesign.com/changing-back-to-default-permissions/</link>
		<comments>http://www.dustinsdesign.com/changing-back-to-default-permissions/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 21:02:30 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
		
		<category><![CDATA[Server Administration]]></category>

		<guid isPermaLink="false">http://www.dustinsdesign.com/?p=232</guid>
		<description><![CDATA[When modifying file permissions it is sometimes necessary to go back to the drawing board and set back to the default permissions. The following command can be used via ssh and takes a couple seconds vs trying to do this via ftp file by file (which can take a very long time depending on the [...]]]></description>
			<content:encoded><![CDATA[<p>When modifying file permissions it is sometimes necessary to go back to the drawing board and set back to the default permissions. The following command can be used via ssh and takes a couple seconds vs trying to do this via ftp file by file (which can take a very long time depending on the size of your website)</p>
<p>Change to the directory you want changed, then run these;</p>
<div class="dean_ch" style="white-space: wrap;">
find . -type f -<a href="http://www.php.net/exec"><span class="kw3">exec</span></a> <a href="http://www.php.net/chmod"><span class="kw3">chmod</span></a> <span class="nu0">644</span> <span class="br0">&#123;</span><span class="br0">&#125;</span> \;<br />
find . -type d -<a href="http://www.php.net/exec"><span class="kw3">exec</span></a> <a href="http://www.php.net/chmod"><span class="kw3">chmod</span></a> <span class="nu0">755</span> <span class="br0">&#123;</span><span class="br0">&#125;</span> \;<br />
&nbsp;</div>
<p>Will set permission for all files to 644 and all directories to 755.</p>
<p>This works for pretty much any Linux server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustinsdesign.com/changing-back-to-default-permissions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>curl&#160;&#38;&#160;wget&#160;in WordPress posts</title>
		<link>http://www.dustinsdesign.com/curlwgetin-wordpress-posts/</link>
		<comments>http://www.dustinsdesign.com/curlwgetin-wordpress-posts/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 02:59:16 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
		
		<category><![CDATA[Blogging]]></category>

		<category><![CDATA[Server Administration]]></category>

		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.dustinsdesign.com/?p=204</guid>
		<description><![CDATA[My last post posed some problems. When attempting to save I received the 403 forbidden error seen here. I found that the reason for this was due to mod_security getting uppity over the word wget&#160;in my code examples. You will get the same issue if you ever use the word curl&#160;(even in a normal sentence [...]]]></description>
			<content:encoded><![CDATA[<p>My last post posed some problems. When attempting to save I received the 403 forbidden error seen here. I found that the reason for this was due to mod_security getting uppity over the word wget&nbsp;in my code examples. You will get the same issue if you ever use the word curl&nbsp;(even in a normal sentence like &#8220;curl&nbsp;up&#8221;).</p>
<p><img src="http://www.dustinsdesign.com/wp-content/uploads/2008/10/403.png" alt="" title="403"  /></p>
<p>If you run into this issue you have 2 choices. </p>
<ol>
<li>Change mod_security</li>
<li>Use a simple workaround</li>
</ol>
<p>I opt for #2. Changing mod_security is complex and the inability to use these words is there for a reason. They are commands that can cause some serious havoc to your server if abused. So, instead of gimping your security simply do the following:</p>
<p>use &amp;nbsp; (non-breaking space HTML element)</p>
<p>To use these words in this post I did the following:</p>
<p>Title: curl&amp;nbsp;&&amp;nbsp;wget&amp;nbsp;in WordPress posts<br />
In a sentence: &#8220;&#8230;the word wget&amp;nbsp;in my code examples&#8230;&#8221;</p>
<p>Just make sure you never have the problem word, then a normal space, then any text. It will cause the 403 error.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustinsdesign.com/curlwgetin-wordpress-posts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Finally, how to set SpamAssasin!</title>
		<link>http://www.dustinsdesign.com/finally-how-to-set-spamassasin/</link>
		<comments>http://www.dustinsdesign.com/finally-how-to-set-spamassasin/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 02:31:42 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
		
		<category><![CDATA[Blogging]]></category>

		<category><![CDATA[Fun]]></category>

		<category><![CDATA[Photography]]></category>

		<category><![CDATA[Server Administration]]></category>

		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.dustinsdesign.com/?p=181</guid>
		<description><![CDATA[I proudly battle against spam on behalf of my clients! Running PLESK and SpamAssassin, it takes a lot of tweaks to make sure the mystery meat doesn&#8217;t get through. I recently came across the following and am currently testing it out. So far, its looking good!
Originally posted at www.jaguarpc.com by thisisit3

- START
Contrary to popular belief, [...]]]></description>
			<content:encoded><![CDATA[<p>I proudly battle against spam on behalf of my clients! Running PLESK and SpamAssassin, it takes a lot of tweaks to make sure the mystery meat doesn&#8217;t get through. I recently came across the following and am currently testing it out. So far, its looking good!</p>
<p>Originally posted at <a href="http://www.jaguarpc.com/forums/showthread.php?t=17227">www.jaguarpc.com</a> by thisisit3</p>
<p><span id="more-181"></span><br />
- START</p>
<p>Contrary to popular belief, spam is easy to combat. All it takes is a well configured SpamAssassin running on the server. Unfortunately the definition of &#8220;well configured&#8221; is very loosely defined in this context as its completely different for every domain/server.</p>
<p>One such example is the average person who blocks emails that contain the word &#8220;viagra&#8221;, but an actual medical doctor may use that word rather regularly.</p>
<p>So here is how to make SpamAssassin block 99% of spam:</p>
<h2>STEP 1 - Raise score for Realtime Blackhole lists (RBL)</h2>
<p>The default scores for RBLs are set too low. For example, if an email is marked as spam by SORBS then there is no reason giving it a score of 2. Based on my tests over a two year period RBLs are very safe to use. There are some issues with SpamCop but those always resolve after a few days.</p>
<p>Edit your &#8220;/etc/mail/spamassassin/local.cf&#8221; and add:</p>
<p>Code:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="co2"># Raise RBL scores</span><br />
score RCVD_IN_BL_SPAMCOP_NET <span class="nu0">10</span><br />
score RCVD_IN_SBL <span class="nu0">5</span><br />
score RCVD_BY_IP <span class="nu0">2</span><br />
score DNS_FROM_AHBL_RHSBL <span class="nu0">3</span><br />
score URIBL_WS_SURBL <span class="nu0">3</span><br />
score RCVD_IN_SORBS_WEB <span class="nu0">3</span><br />
score RCVD_IN_SORBS_SMTP <span class="nu0">3</span><br />
score URIBL_OB_SURBL <span class="nu0">5</span><br />
score RCVD_IN_NJABL_DUL <span class="nu0">4</span><br />
score RCVD_IN_XBL <span class="nu0">5</span><br />
score RCVD_IN_SORBS_DUL <span class="nu0">3</span><br />
score URIBL_SBL <span class="nu0">5</span><br />
score URIBL_JP_SURBL <span class="nu0">4</span><br />
&nbsp;</div>
<p>&nbsp;</p>
<h2>STEP 2 - Raise score for BAYES</h2>
<p>The default scores for BAYES are set to the lowest possible. These scores are automaticaly generated by a special script used by the developers of SpamAssassin and its generates the score based on all the rules. Unfortunately the high probability scores are too low, for example a 90% probability is a definit spam, so there is no reason why its score should be 2.</p>
<p>Edit your &#8220;/etc/mail/spamassassin/local.cf&#8221; and add:</p>
<p>Code:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="co2"># Raise bayes scores</span><br />
score BAYES_80 <span class="nu0">3.5</span><br />
score BAYES_95 <span class="nu0">4.5</span><br />
score BAYES_99 <span class="nu0">5.0</span><br />
&nbsp;</div>
<p>&nbsp;</p>
<h2>STEP 3 - S.A. Rules Emporium (SARE)</h2>
<p>There is a special team of commandos who track daily spam. These guys have sat down and written rules that target specific strings within spam. One such tick is to scan for telephones and addresses used in spam, thus they don&#8217;t need to look for &#8220;viagra&#8221; in all its different variations instead they look for the phone or address of the guy selling them. As a result, their rules allow a doctor to get emails with &#8220;viagra&#8221; in them, while blocking spam at the same time.</p>
<p>These guys go even further, they have rules for:<br />
- Rules to detect commonly abused redirectors and uri obfuscation techniques.<br />
- Addresses and phone numbers harvested from spam<br />
- Bayes poison using lists of words with equal length<br />
- HTML coding rules that detect various spammer tricks applied through HTML coding within messages<br />
- Header rules that are not found in other SARE rulesets.<br />
- Rule set which flags specific spam and/or spam from specific spammers<br />
- SARE Adult rules are designed to catch spam with &#8220;Adult&#8221; material.<br />
- SARE &#8220;BML&#8221; rules are designed to catch &#8220;business, marketing and educational&#8221; spam.<br />
- SARE Fraud rules are designed to catch &#8220;Nigerian 419&#8243;, &#8220;International Lotto&#8221;, etc. type scams.<br />
- LOADS OF OTHERS&#8230;</p>
<p>Their website is at: <a href="http://www.rulesemporium.co">http://www.rulesemporium.com/</a></p>
<p>Below are the safest rule sets which can be used everywhere. Just go to your &#8220;/etc/mail/spamassassin/&#8221; directory and run the following commands from the shell, thats all you need to do, they are automatically included when SA scans that directory.</p>
<p>Code:</p>
<div class="dean_ch" style="white-space: wrap;">
wget http:<span class="co1">//www.rulesemporium.com/rules/70_sare_evilnum0.cf</span><br />
wget http:<span class="co1">//www.rulesemporium.com/rules/70_sare_evilnum1.cf</span><br />
wget http:<span class="co1">//www.rulesemporium.com/rules/70_sare_header0.cf</span><br />
wget http:<span class="co1">//www.rulesemporium.com/rules/70_sare_html0.cf</span><br />
wget http:<span class="co1">//www.rulesemporium.com/rules/70_sare_oem.cf</span><br />
wget http:<span class="co1">//www.rulesemporium.com/rules/72_sare_redirect_post3.0.0.cf</span><br />
wget http:<span class="co1">//www.rulesemporium.com/rules/99_sare_fraud_post25x.cf</span><br />
wget http:<span class="co1">//www.rulesemporium.com/rules/70_sare_genlsubj0.cf</span><br />
&nbsp;</div>
<p>&nbsp;</p>
<h2>STEP 4 - Final step</h2>
<p>Finally, make sure your required score is still set to the default 5 because all the above rules expect that it hasn&#8217;t been changed.</p>
<p>Code:</p>
<div class="dean_ch" style="white-space: wrap;">
required_score <span class="nu0">5.0</span><br />
&nbsp;</div>
<p>&nbsp;</p>
<p>Once you&#8217;ve run your system with the above and you are comfortable with the results, you may automaticaly delete spam with a score of 8 or more. The safest way is to create a filter rule in cPanel (Mail -> Email Filtering):</p>
<p>Code:</p>
<div class="dean_ch" style="white-space: wrap;">
Select <span class="st0">&quot;Any header&quot;</span> that <span class="st0">&quot;contains&quot;</span> the string <span class="st0">&quot;X-Spam-Level: ********&quot;</span> <span class="br0">&#40;</span>without quotes<span class="br0">&#41;</span><br />
&nbsp;</div>
<p>&nbsp;</p>
<p>The result is this:</p>
<p>$message_headers contains &#8220;X-Spam-Level: ********&#8221;</p>
<p>- END</p>
<p>I&#8217;ll add that if you have PLESK you can make this last change by editing the &#8217;spam filter&#8217; setting instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustinsdesign.com/finally-how-to-set-spamassasin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Transfer Horde emails to a new server</title>
		<link>http://www.dustinsdesign.com/transfer-horde-emails-to-a-new-server/</link>
		<comments>http://www.dustinsdesign.com/transfer-horde-emails-to-a-new-server/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 05:32:06 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
		
		<category><![CDATA[Server Administration]]></category>

		<category><![CDATA[email]]></category>

		<category><![CDATA[Horde]]></category>

		<guid isPermaLink="false">http://www.dustinsdesign.com/?p=163</guid>
		<description><![CDATA[I use Horde as the primary webmail app for both myself and for many of the clients hosted at Dynamic. Occasionally it becomes necessary to move the emails saved on the server to a new server or email account. This can easily be done with the Linux/Unix scp (secure copy) command. 
Here&#8217;s how to do [...]]]></description>
			<content:encoded><![CDATA[<p>I use Horde as the primary webmail app for both myself and for many of the clients hosted at Dynamic. Occasionally it becomes necessary to move the emails saved on the server to a new server or email account. This can easily be done with the Linux/Unix scp (secure copy) command. </p>
<p><strong>Here&#8217;s how to do it:</strong></p>
<ol>
<li>Copy all email and folders over to the new server using scp. Make sure the email you are copying to is already set up on the new server.
<p>Log into the old server via SSH and type the following</p>
<div class="dean_ch" style="white-space: wrap;">
scp -p -r -P <span class="br0">&#91;</span>port<span class="br0">&#93;</span> /<span class="kw2">var</span>/qmail/mailnames/<span class="br0">&#91;</span>domain<span class="br0">&#93;</span>/<span class="br0">&#91;</span>email<span class="br0">&#93;</span> root@<span class="br0">&#91;</span>IP of destination server<span class="br0">&#93;</span>:/<span class="kw2">var</span>/qmail/mailnames/<span class="br0">&#91;</span>domain<span class="br0">&#93;</span>/<br />
&nbsp;</div>
<p>You will be prompted for the root password of the server you are moving emails to. Once entered in you will view all the files being copied over.
</li>
<li>Log into the new server and change the ownership of the files moved. Before you do this the ownership will be root.root and will not show up if you log into Horde.
<div class="dean_ch" style="white-space: wrap;">
cd /<span class="kw2">var</span>/qmail/mailnames/<span class="br0">&#91;</span>domain<span class="br0">&#93;</span>/<span class="br0">&#91;</span>email<span class="br0">&#93;</span>/<br />
<a href="http://www.php.net/chown"><span class="kw3">chown</span></a> popuser:popuser *.* -R<br />
&nbsp;</div>
</li>
</ol>
<p>Done!</p>
<p>Note: Not all servers are the same, so (like any SSH command) do this at your own risk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustinsdesign.com/transfer-horde-emails-to-a-new-server/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Changing the name of Horde</title>
		<link>http://www.dustinsdesign.com/changing-the-name-of-horde/</link>
		<comments>http://www.dustinsdesign.com/changing-the-name-of-horde/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 04:54:30 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
		
		<category><![CDATA[Server Administration]]></category>

		<category><![CDATA[Horde]]></category>

		<guid isPermaLink="false">http://www.dustinsdesign.com/?p=151</guid>
		<description><![CDATA[If you use Horde 3 as the webmail client for your clients you may want to customize the name of the login page to something more friendly to your business. You can do so by editing the &#8216;registry.php&#8217; file in your configuration directory (on most my servers located at /etc/psa-horde/horde/). Toward the bottom you will [...]]]></description>
			<content:encoded><![CDATA[<p>If you use Horde 3 as the webmail client for your clients you may want to customize the name of the login page to something more friendly to your business. You can do so by editing the &#8216;registry.php&#8217; file in your configuration directory (on most my servers located at /etc/psa-horde/horde/). Toward the bottom you will find:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="re0">$this</span>-&gt;<span class="me1">applications</span><span class="br0">&#91;</span><span class="st0">&#8216;horde&#8217;</span><span class="br0">&#93;</span> = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><br />
&nbsp; &nbsp; <span class="st0">&#8216;fileroot&#8217;</span> =&gt; <span class="st0">&#8216;/usr/share/psa-horde&#8217;</span>,<br />
&nbsp; &nbsp; <span class="st0">&#8216;webroot&#8217;</span> =&gt; <span class="re0">$webroot</span>,<br />
&nbsp; &nbsp; <span class="st0">&#8216;initial_page&#8217;</span> =&gt; <span class="st0">&#8216;login.php&#8217;</span>,<br />
&nbsp; &nbsp; <span class="st0">&#8216;name&#8217;</span> =&gt; <a href="http://www.php.net/_"><span class="kw3">_</span></a><span class="br0">&#40;</span><span class="st0">&quot;Horde&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; <span class="st0">&#8217;status&#8217;</span> =&gt; <span class="st0">&#8216;active&#8217;</span>,<br />
&nbsp; &nbsp; <span class="st0">&#8216;templates&#8217;</span> =&gt; <span class="st0">&#8216;/usr/share/psa-horde/templates&#8217;</span>,<br />
&nbsp; &nbsp; <span class="st0">&#8216;provides&#8217;</span> =&gt; <span class="st0">&#8216;horde&#8217;</span><br />
<span class="br0">&#41;</span>;<br />
&nbsp;</div>
<p>Change (&#8221;Horde&#8221;) to (&#8221;WhateverYouWant&#8221;). For me I changed it to (&#8221;DynamicMail&#8221;) seen below.</p>
<p><img src="http://www.dustinsdesign.com/wp-content/uploads/2008/10/horde-name.png" alt="" title="horde-name" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustinsdesign.com/changing-the-name-of-horde/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Default Horde Theme</title>
		<link>http://www.dustinsdesign.com/default-horde-theme/</link>
		<comments>http://www.dustinsdesign.com/default-horde-theme/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 04:40:26 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
		
		<category><![CDATA[Server Administration]]></category>

		<category><![CDATA[Horde]]></category>

		<guid isPermaLink="false">http://www.dustinsdesign.com/?p=146</guid>
		<description><![CDATA[If you would like have a different default theme other than the &#8216;Blue and White&#8217; theme that ships with Horde 3 you can easily do so by editing the prefs.php located in the Horde conf-directory (on most my servers it is located at /etc/psa-horde/horde/). About 2/3rds of the way down in the file you will [...]]]></description>
			<content:encoded><![CDATA[<p>If you would like have a different default theme other than the &#8216;Blue and White&#8217; theme that ships with Horde 3 you can easily do so by editing the prefs.php located in the Horde conf-directory (on most my servers it is located at /etc/psa-horde/horde/). About 2/3rds of the way down in the file you will find:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="co1">// UI theme</span><br />
<span class="re0">$_prefs</span><span class="br0">&#91;</span><span class="st0">&#8216;theme&#8217;</span><span class="br0">&#93;</span> = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><br />
&nbsp; &nbsp; <span class="st0">&#8216;value&#8217;</span> =&gt; <span class="st0">&#8216;bluewhite&#8217;</span>,<br />
&nbsp; &nbsp; <span class="st0">&#8216;locked&#8217;</span> =&gt; <span class="kw2">false</span>,<br />
&nbsp; &nbsp; <span class="st0">&#8217;shared&#8217;</span> =&gt; <span class="kw2">true</span>,<br />
&nbsp; &nbsp; <span class="st0">&#8216;type&#8217;</span> =&gt; <span class="st0">&#8217;select&#8217;</span>,<br />
&nbsp; &nbsp; <span class="st0">&#8216;desc&#8217;</span> =&gt; <a href="http://www.php.net/_"><span class="kw3">_</span></a><span class="br0">&#40;</span><span class="st0">&quot;Select your color scheme.&quot;</span><span class="br0">&#41;</span><br />
<span class="br0">&#41;</span>;<br />
&nbsp;</div>
<p>Change &#8216;bluewhite&#8217; to the directory name of the theme you would like to use as the default. A great theme I use that does not ship with Horde is <a href="http://www.w8.se/horde/download">WPS Sober</a> found <a href="http://www.w8.se/horde/download">here</a> (read the README.txt in the download for installation directions). If you go with the WPS Sober you would change &#8216;bluewhite&#8217; to &#8216;wps_sober&#8217; after installing the theme.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustinsdesign.com/default-horde-theme/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Removing news feeds from Horde</title>
		<link>http://www.dustinsdesign.com/removing-news-feeds-from-horde/</link>
		<comments>http://www.dustinsdesign.com/removing-news-feeds-from-horde/#comments</comments>
		<pubDate>Thu, 08 May 2008 01:34:28 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
		
		<category><![CDATA[Server Administration]]></category>

		<category><![CDATA[Horde]]></category>

		<category><![CDATA[Plesk]]></category>

		<guid isPermaLink="false">http://www.dustinsdesign.com/removing-news-feeds-from-horde/</guid>
		<description><![CDATA[If you’ve used newer versions of Horde with Plesk, you have probably seen the news feed that runs down the left side of the screen. This newsbar is irritating at best. Here is how to get rid of it. 
Open the following file in your text editor:

/usr/share/psa-horde/templates/portal/sidebar.inc
&#160;
Around line 102 comment out the entire if() statement [...]]]></description>
			<content:encoded><![CDATA[<p>If you’ve used newer versions of Horde with Plesk, you have probably seen the news feed that runs down the left side of the screen. This newsbar is irritating at best. Here is how to get rid of it. </p>
<p>Open the following file in your text editor:</p>
<div class="dean_ch" style="white-space: wrap;">
/usr/share/psa-horde/templates/portal/sidebar.inc<br />
&nbsp;</div>
<p>Around line 102 comment out the entire if() statement (lines 102-117).</p>
<p><em>If you upgrade Plesk, you will most likely have to repeat this process.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustinsdesign.com/removing-news-feeds-from-horde/feed/</wfw:commentRss>
		</item>
		<item>
		<title>.htaccess redirect based on requested domain</title>
		<link>http://www.dustinsdesign.com/htaccess-redirect-based-on-requested-domain/</link>
		<comments>http://www.dustinsdesign.com/htaccess-redirect-based-on-requested-domain/#comments</comments>
		<pubDate>Wed, 07 May 2008 16:19:48 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
		
		<category><![CDATA[Server Administration]]></category>

		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://www.dustinsdesign.com/htaccess-redirect-based-on-requested-domain/</guid>
		<description><![CDATA[I often use the following .htaccess / mod_rewrite solution to redirect domain names based on the requested domain. The reasons for this are many. Most recent example for me is I had a single site with 5 alias domains but software licensed for only one. Even though I had the alias domains set up on [...]]]></description>
			<content:encoded><![CDATA[<p>I often use the following .htaccess / mod_rewrite solution to redirect domain names based on the requested domain. The reasons for this are many. Most recent example for me is I had a single site with 5 alias domains but software licensed for only one. Even though I had the alias domains set up on the server it still did not satisfy the license. Add the line below to htaccess and now no matter which of the 5 domains are written in they are re-written to the one with the licence (need to duplicate for each domain). The license is valid since its all the same physical website and everyone is happy. Brilliant! </p>
<p>I am sure there is a more eloquent  way of accomplishing this with mod_rewrite - but this gets the job done!</p>
<div class="dean_ch" style="white-space: wrap;">
RewriteEngine On</p>
<p>RewriteCond %<span class="br0">&#123;</span>HTTP_HOST<span class="br0">&#125;</span> ^<span class="br0">&#40;</span>www\.<span class="br0">&#41;</span>?yourdomain\.com <span class="br0">&#91;</span>NC<span class="br0">&#93;</span><br />
RewriteRule ^<span class="br0">&#40;</span>.*<span class="br0">&#41;</span>$ http:<span class="co1">//otherdomain.com/$1 [R=301,L]</span><br />
&nbsp;</div>
<p>Can also be used to redirect to a landing page based on the requested domain:</p>
<div class="dean_ch" style="white-space: wrap;">
RewriteEngine On</p>
<p>RewriteCond %<span class="br0">&#123;</span>HTTP_HOST<span class="br0">&#125;</span> ^www.domain.com<br />
Rewriterule ^<span class="br0">&#40;</span>.*<span class="br0">&#41;</span>$ http:<span class="co1">//www.any-domain.com/landing-page.html [L]</span><br />
&nbsp;</div>
<p>Have a better solution? I&#8217;m no mod_rewrite guru so comments are always welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustinsdesign.com/htaccess-redirect-based-on-requested-domain/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Truth About Hosting</title>
		<link>http://www.dustinsdesign.com/the-truth-about-hosting/</link>
		<comments>http://www.dustinsdesign.com/the-truth-about-hosting/#comments</comments>
		<pubDate>Mon, 24 Sep 2007 19:48:13 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
		
		<category><![CDATA[Server Administration]]></category>

		<category><![CDATA[hosting]]></category>

		<category><![CDATA[overselling]]></category>

		<guid isPermaLink="false">http://www.dustinsdesign.com/the-truth-about-hosting/</guid>
		<description><![CDATA[Over the years I have used several hosting companies for my own personal websites and for the last few years administered our company dedicated servers. In this time I have noticed an industry trend to ‘oversell’ hosting. This is most prominent in the very inexpensive hosting options know as ‘shared hosting’. In this article I [...]]]></description>
			<content:encoded><![CDATA[<p>Over the years I have used several hosting companies for my own personal websites and for the last few years administered our company dedicated servers. In this time I have noticed an industry trend to ‘oversell’ hosting. This is most prominent in the very inexpensive hosting options know as ‘shared hosting’. In this article I will explain the different hosting options and expose what I believe to be the truth about ‘overselling’ in the industry.</p>
<p><span id="more-8"></span></p>
<h2>What is Overselling?</h2>
<p>
When a company oversells hosting they are selling more resources than they currently have. For example, If you have a 200 GB Dedicated Server and you sell 30 X 10 GB Hosting Packages on that server you have sold 300 GB of server space and have oversold the server by 100 GB. However, the typical website uses about 50 Megs of space and 1 GB bandwidth per month, so the odds that any of your 30 clients will use up their resources is low.
</p>
<p>Imagine the number of 50 Meg websites you could hold on a 200 GB server. For those not good in byte conversions, you could fit 4096 X 50 Meg websites on a 200 GB server!! So the temptation to do this and the potential profits are huge! But it doesn’t seem very ethical does it.</p>
<h2>What types of hosting are there?</h2>
<p>
There are basically three types of hosting:</p>
<p>
1)  <strong>Shared Hosting</strong> – Your site is on a server with any number of other websites all sharing the resources of the same server. How many sites are on your server? Only your webhost knows for sure – and he’s not telling. The actual resources available for your site are largely unknown.</p>
<p>
2) <strong>Virtual Dedicated</strong> – Here you in effect have your own server with all the control that comes along with it. You are allocated a set amount of resources and possibly might get them. The problem is, a Virtual Dedicated, just like Shared Hosting will have multiple accounts on one server. The difference is the host expects you to use more resources so they hopefully put less accounts on that single server. How many accounts? Again, only the webhost knows for sure.</p>
<p>
3) <strong>Dedicated Server</strong> – Finally, a breath of fresh air! The resources you buy are the exact resources you get and you have all the control you need. The down side? You are going to pay for it: $80 - $400+ per month. The dedicated server is a computer in a datacenter with no other sites on it but your own. There is no sharing of the resources so you know they are all yours to use.
</p>
<p>Ok, now that we have a better picture of the types of hosting, <em>back to overselling.</em></p>
<h2>How prominent is Overselling?</h2>
<p>
So, how many companies are actually overselling their resources? I think the following example should shed some light on this:
<p>
The following numbers are taken from GoDaddy.com as an example:</p>
<p>First let’s take the biggest pre-configured dedicated server currently at GoDaddy.com:</p>
<ul>
<li>600 GB of Storage</li>
<li>2000 GB Bandwidth/month</li>
<li>Price: $271.90/month</p>
</li>
</ul>
<p>
And now the biggest shared hosting option:</p>
<ul>
<li>200 GB of Storage</li>
<li>2000 GB Bandwidth/month</li>
<li>Price:  $14.99/month</li>
</ul>
<p>Already a little red flag should go up, why such a price difference for 400 GB more space? The truth is, every hosting company I have seen do not expect their ‘shared hosting’ customers to ever come near their resource limits (Remember when I mentioned the average site uses about 50 Megs of storage and 1 GB bandwidth per month).  So the numbers are inflated to look like more than you will actually get. It’s a numbers game between hosting providers to out sell the competition through marketing. This concept is also where ‘unlimited’ storage and/or bandwidth comes from. But instead of flashing a number higher than they ever expect the average site owner to use they just say unlimited. Another marketing ploy. In my experience with shared hosting, the numbers will never reflect your actual resources.</p>
<p>
Also remember, ‘shared hosting’ is really just multiple hosting packages on a single dedicated server. And with a dedicated server you actually get the exact resources you pay for. Here is what hosting companies do: Take the numbers in our previous example. How many of the ‘shared hosting’ accounts would have to be on the ‘dedicated’ server in our example to cover your costs? 19!! ($217.90 / $14.99) But that would mean we sold 3800 GB of storage and 38000 in Bandwidth for our 600 GB, 2000 GB Bandwidth server! This is a rough example, but is a good example of the sort of ‘overselling’ that is standard in the industry. </p>
<h2>What happens if I use most of the resources on my ‘shared hosting’ account?</h2>
<p>
If you happen to actually use the resources stated in your ‘shared hosting’ agreement a few things will most likely happen. One, your site performance will be horrid. The server your site is on is sharing resources with potentially hundreds of other websites. As you use up resources you take away from all the other sites on the server. And as they compete for those resources your site will slow down and potentially just stop serving your site altogether (If you have ever seen a ‘too many requests to server’ or ‘server is too busy’ message when trying to visit a site this is one of the reasons for it). Two, your host will most likely contact you and either tell you they are shutting off your account or give you the option to upgrade to a virtual dedicated or dedicated server. You see, they were betting on you never using what they offered and they lost the bet. However, they have an out in their hosting agreement that says they can deny service for whatever reason they deem fit. </p>
<h2>What type of hosting should I get?</h2>
<p>
For most sites shared hosting is where you want to be.  You just need to know what it really is and that you could potentially outgrow it way before you hit your resource limits. Working with a host that is trustworthy and has a good reputation for taking care of their clients is key. If you need more they will let you know and move your site to a hosting option with more resources. Most sites never outgrow shared hosting.<br />
For sites that you know will need a large amount of space or high traffic avoid shared hosting from large companies. If you are sure that your site will have a very large amount of traffic from day one a virtual dedicated or dedicated is better.</p>
<h2>So is Overselling Wrong?</h2>
<p>
While I personally think overselling is unethical in many cases, fighting an industry standard is hard to do.  When I was first exposed to this technique I was appalled, but as my business grew I came to understand it more. The concept is similar to that of the electric company. The reality is, if everyone turns on all the appliances in their house at the same time there will be a power shortage. Same goes for internet access: If everyone tries to download a huge file at the same time the download for everyone will screech to a halt. From a business standpoint you must maintain a healthy ratio of resources to demand and up the resources as the demand increases all while keeping everyone happy, your service strong and your business in the black.</p>
<p>
<em>So is overselling wrong? </em>Not really, as long as the company behind it is responsible and makes sure everyone has a good experience using their service. I personally believe that if one site in a shared network is using most the resources the host should move them around to better spread the load for as long as physically possible without changing the package or affecting other sites. This however takes a great deal of management that is sometimes impossible with larger companies. It will also mean you are loosing money with that specific site. But those are the caveats of overselling from a responsible business standpoint.</p>
<p>Addition 5/7/08: Reading back over this article I wanted to add that I do feel that overselling is wrong in vps and dedicated servers. In these solutions you should be paying for the exact resources promised.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dustinsdesign.com/the-truth-about-hosting/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
