<?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>InstaCarma Blog &#187; apache</title>
	<atom:link href="http://www.instacarma.com/blog/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.instacarma.com/blog</link>
	<description>Information Resource for Web Hosting Technical Support and Server Management</description>
	<lastBuildDate>Sat, 10 Mar 2012 21:44:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Varnish Caching Engine with Apache</title>
		<link>http://www.instacarma.com/blog/technical/varnish-caching-engine-with-apache/</link>
		<comments>http://www.instacarma.com/blog/technical/varnish-caching-engine-with-apache/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 07:49:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles and tutorials]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[Varnish]]></category>
		<category><![CDATA[Varnish Caching Engine]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1452</guid>
		<description><![CDATA[Filed under: apache, Caching, Varnish, Varnish Caching Engine Assume : domain to be accessed is accessible via the url domain.com Varnish caching engine will run infront of Apache in port 80, and internally forward the requests to Apache. Installation of Varnish: 1. Download Varnish source file from sourceforge.net 2. Install libraries below via yum, as [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/caching/'>Caching</a>, <a href='http://www.instacarma.com/blog/tag/varnish/'>Varnish</a>, <a href='http://www.instacarma.com/blog/tag/varnish-caching-engine/'>Varnish Caching Engine</a></p>
<p>Assume : domain to be accessed is accessible via the url domain.com<br />
Varnish caching engine will run infront of Apache in port 80, and internally forward the requests to Apache.</p>
<p>Installation of Varnish:</p>
<p>1. Download Varnish source file from sourceforge.net<br />
2. Install libraries below via yum, as well as any other dependencies.</p>
<p><em>yum install logrotate libgomp gcc cpp binutils kernel-headers glibc-headers glibc-devel pcre-devel</em></p>
<p>3. Do ./configure, make, make install to install varnish<br />
4. Configure Apache to listen on another port 8080 and restart Apache for changes to reflect.<br />
5. Start Varnish as below, before that you can configure the default config file /usr/local/etc/varnish/default.vcl as mentioned in (6)<br />
If varnish available under services, configure the file below with the parameters below:</p>
<p>Code:</p>
<blockquote><p>DAEMON_OPTS=&#8221;-a :80 \<br />
-T localhost:6082 \<br />
-f /usr/local/etc/varnish/default.vcl\<br />
-S /etc/varnish/secret \<br />
-s malloc,200M \</p></blockquote>
<p>And do</p>
<p>Code:</p>
<blockquote><p>/etc/rc.d/init.d/varnish start</p></blockquote>
<p>If its not available under services, start it as below:</p>
<p>Code:</p>
<blockquote><p>varnishd -f /usr/local/etc/varnish/default.vcl -T 127.0.0.1:6082  -a 0.0.0.0:80  -s malloc,200M</p></blockquote>
<p>If you want to connec to the commandline interface use</p>
<blockquote><p>varnishd -f /usr/local/etc/varnish/default.vcl -T 127.0.0.1:6082  -a 0.0.0.0:80  -s malloc,200M -d</p></blockquote>
<p>6. A sample config file for Apache is as below. It can be tweaked as per customization required as outlined in http://www.varnish-cache.org/trac/wiki/Introduction</p>
<p>Code:</p>
<blockquote><p>backend default {<br />
.host = &#8220;69.50.217.14&#8243;;<br />
.port = &#8220;8080&#8243;;<br />
}</p>
<p>acl purge {<br />
&#8220;localhost&#8221;;<br />
&#8220;69.50.217.14&#8243;;<br />
}</p>
<p>sub vcl_recv {</p>
<p>// Strip cookies for static files:<br />
if (req.url ~ &#8220;\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$&#8221;) {<br />
unset req.http.Cookie;<br />
return(lookup);<br />
}</p>
<p>// Remove has_js and Google Analytics __* cookies.<br />
set req.http.Cookie = regsuball(req.http.Cookie, &#8220;(^|;\s*)(__[a-z]+|has_js)=[^;]*&#8221;, &#8220;&#8221;);</p>
<p>// Remove a &#8220;;&#8221; prefix, if present.<br />
set req.http.Cookie = regsub(req.http.Cookie, &#8220;^;\s*&#8221;, &#8220;&#8221;);</p>
<p>// Remove empty cookies.<br />
if (req.http.Cookie ~ &#8220;^\s*$&#8221;) {<br />
unset req.http.Cookie;<br />
}</p>
<p>if (req.request == &#8220;PURGE&#8221;) {<br />
if (!client.ip ~ purge) {<br />
error 405 &#8220;Not allowed.&#8221;;<br />
}<br />
purge(&#8220;req.url ~ &#8221; req.url &#8221; &amp;&amp; req.http.host == &#8221; req.http.host);<br />
error 200 &#8220;Purged.&#8221;;<br />
}<br />
}</p>
<p>sub vcl_hash {<br />
if (req.http.Cookie) {<br />
set req.hash += req.http.Cookie;<br />
}<br />
}</p>
<p>sub vcl_fetch {</p>
<p>// Strip cookies for static files:<br />
if (req.url ~ &#8220;\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$&#8221;) {<br />
unset beresp.http.set-cookie;<br />
}</p>
<p>// Varnish determined the object was not cacheable<br />
if (!beresp.cacheable) {<br />
set beresp.http.X-Cacheable = &#8220;NO:Not Cacheable&#8221;;<br />
}</p>
<p>// You don&#8217;t wish to cache content for logged in users<br />
elsif(req.http.Cookie ~&#8221;(UserID|_session)&#8221;) {<br />
set beresp.http.X-Cacheable = &#8220;NO:Got Session&#8221;;<br />
return(pass);<br />
}</p>
<p>// You are respecting the Cache-Control=private header from the backend<br />
elsif ( beresp.http.Cache-Control ~ &#8220;private&#8221;) {<br />
set beresp.http.X-Cacheable = &#8220;NO:Cache-Control=private&#8221;;<br />
return(pass);<br />
}</p>
<p>// You are extending the lifetime of the object artificially<br />
elsif ( beresp.ttl &lt; 1s ) {<br />
set beresp.ttl   = 300s;<br />
set beresp.grace = 300s;<br />
set beresp.http.X-Cacheable = &#8220;YES:Forced&#8221;;<br />
}</p>
<p>// Varnish determined the object was cacheable<br />
else {<br />
set beresp.http.X-Cacheable = &#8220;YES&#8221;;<br />
}</p>
<p>return(deliver);<br />
}</p></blockquote>
<p>7. Varnish Cache log can be started using the command below:</p>
<p>Code:</p>
<blockquote><p>/usr/local/bin/varnishlog -w /tmp/vlog &amp;</p></blockquote>
<p>And tailing /tmp/vlog to see the dump of the requests handled by Varnish.</p>
<p>8. Any other problems with Apache can be checked from Apache error log, for instance http://domain.com shows a blank page.<br />
9. You can also benchmark the difference in performance before and after using Varnish using the Apache bench marking tool ab and the commandline below:</p>
<p>Code:</p>
<blockquote><p>ab -n1000 -c100 http://domain.com/</p></blockquote>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/varnish-caching-engine-with-apache/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/varnish-caching-engine-with-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable SuPHP ?</title>
		<link>http://www.instacarma.com/blog/technical/how-to-enable-suphp/</link>
		<comments>http://www.instacarma.com/blog/technical/how-to-enable-suphp/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 20:20:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[easyapache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[suexec]]></category>
		<category><![CDATA[suphp]]></category>
		<category><![CDATA[WHM]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1182</guid>
		<description><![CDATA[Filed under: apache, cPanel, easyapache, PHP, suexec, suphp, WHM Issue : How to enable SuPHP ? Solution : Login to WHM. Go to &#8220;Service Configuration >> Apache Configuration >> Configure PHP and Suexec&#8221; and check if SuPHP is available in the drop down menu. If it is available then select it and save the configuration [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/cpanel/'>cPanel</a>, <a href='http://www.instacarma.com/blog/tag/easyapache/'>easyapache</a>, <a href='http://www.instacarma.com/blog/tag/php/'>PHP</a>, <a href='http://www.instacarma.com/blog/tag/suexec/'>suexec</a>, <a href='http://www.instacarma.com/blog/tag/suphp/'>suphp</a>, <a href='http://www.instacarma.com/blog/tag/whm/'>WHM</a></p>
<p><strong>Issue :</strong></p>
<p>How to enable SuPHP ?</p>
<p><strong>Solution : </strong></p>
<p>Login to WHM.</p>
<p>Go to  &#8220;Service Configuration >> Apache Configuration >> Configure PHP and Suexec&#8221; and check if SuPHP is available in the drop down menu. If it is available then select it and save the configuration after a dry run.<br />
SuExec should also be available in the same drop down with an on/off option. </p>
<p>If SuPHP is not available then you need to run EasyApache via &#8220;WHM >> Software >> EasyApache (Apache Update)&#8221; and select SuPHP in the available options. You can also run EasyApache via console by using the following cPanel scipt : </p>
<blockquote><p>
/scripts/easyapache</p></blockquote>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/how-to-enable-suphp/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/how-to-enable-suphp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing /cpanel to something else</title>
		<link>http://www.instacarma.com/blog/technical/changing-cpanel-to-something-else/</link>
		<comments>http://www.instacarma.com/blog/technical/changing-cpanel-to-something-else/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 20:51:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[WHM]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1125</guid>
		<description><![CDATA[Filed under: apache, cPanel, port, redirect, security, WHM Issue : How can you access cPanel like, say, http://domainname.com/xyz ? This is for security purposes. Solution : This can be done but not recommended as it would not be of much effect security-wise. Even if you change it, cPanel/WHM would still run on the standard ports [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/cpanel/'>cPanel</a>, <a href='http://www.instacarma.com/blog/tag/port/'>port</a>, <a href='http://www.instacarma.com/blog/tag/redirect/'>redirect</a>, <a href='http://www.instacarma.com/blog/tag/security/'>security</a>, <a href='http://www.instacarma.com/blog/tag/whm/'>WHM</a></p>
<p><strong>Issue : </strong></p>
<p>How can you access cPanel like, say, http://domainname.com/xyz ? This is for security purposes.</p>
<p><strong>Solution : </strong></p>
<p>This can be done but not recommended as it would not be of much effect security-wise.<br />
Even if you change it, cPanel/WHM would still run on the standard ports (2082/2083 &#038; 2086/2087) which is known to everyone. If you have a valid cPanel license then you can contact their support and get the ports changed. This coupled with a strong password (change regularly) should be good enough.</p>
<p>However, coming back to the original question, you can achieve it in the following way : </p>
<p>Go to <em>/usr/local/apache/conf/httpd.conf</em><br />
Find the following line : </p>
<blockquote><p>ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi</p></blockquote>
<p>Comment it out by adding a &#8216;#&#8217; at the beginning and add the following line below that line : </p>
<blockquote><p>ScriptAliasMatch ^/?xyz/?$ /usr/local/cpanel/cgi-sys/redirect.cgi</p></blockquote>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/changing-cpanel-to-something-else/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/changing-cpanel-to-something-else/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>htaccess redirect for SSL non-www to www</title>
		<link>http://www.instacarma.com/blog/technical/htaccess-redirect-for-non-www-to-www/</link>
		<comments>http://www.instacarma.com/blog/technical/htaccess-redirect-for-non-www-to-www/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 19:46:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1115</guid>
		<description><![CDATA[Filed under: apache, htaccess, redirect, SSL Issue : Need to redirect https://domain.com to https://www.domain.com for SSL purposes. Solution : Use the following code in the htaccess file under the public_html folder for the concerned domain : RewriteEngine On RewriteCond %{HTTP_HOST} ^domain.com [NC] RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/htaccess/'>htaccess</a>, <a href='http://www.instacarma.com/blog/tag/redirect/'>redirect</a>, <a href='http://www.instacarma.com/blog/tag/ssl/'>SSL</a></p>
<p><strong>Issue : </strong></p>
<p>Need to redirect https://domain.com to https://www.domain.com for SSL purposes. </p>
<p><strong>Solution : </strong></p>
<p>Use the following code in the <em>htaccess</em> file under the <em>public_html</em> folder for the concerned domain : </p>
<blockquote><p>RewriteEngine On<br />
RewriteCond %{HTTP_HOST} ^domain.com [NC]<br />
RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]</p></blockquote>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/htaccess-redirect-for-non-www-to-www/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/htaccess-redirect-for-non-www-to-www/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Apache Time out for a single domain</title>
		<link>http://www.instacarma.com/blog/technical/setting-time-out-for-a-single-domain/</link>
		<comments>http://www.instacarma.com/blog/technical/setting-time-out-for-a-single-domain/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 16:21:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1101</guid>
		<description><![CDATA[Filed under: apache Issue : How to change Apache Time Out for a single website ? Solution : Even though Apache Timeout is a global environment directive, you can still change that for a single domain by modifying the corresponding VirtualHost entry for the domain. It should look something like this : ServerName domainname.com ServerAlias [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a></p>
<p><strong>Issue : </strong></p>
<p>How to change Apache Time Out for a single website ?</p>
<p><strong>Solution : </strong></p>
<p>Even though Apache Timeout is a global environment directive, you can still change that for a single domain by modifying the corresponding VirtualHost entry for the domain. </p>
<p>It should look something like this : </p>
<p><VirtualHost xx.xx.xx.xx:80><br />
ServerName domainname.com<br />
ServerAlias www.domainname.com<br />
DocumentRoot /home/user/public_html<br />
ServerAdmin webmaster@domainname.com<br />
Timeout xxx<br />
.<br />
.<br />
.<br />
</VirtualHost></p>
<p>Do restart the <em>httpd</em> service after making the alterations.</p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/setting-time-out-for-a-single-domain/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/setting-time-out-for-a-single-domain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Security concerns in executing binary files</title>
		<link>http://www.instacarma.com/blog/technical/security-concerns-in-executing-binary-files/</link>
		<comments>http://www.instacarma.com/blog/technical/security-concerns-in-executing-binary-files/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 23:18:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1079</guid>
		<description><![CDATA[Filed under: apache, PHP Issue : An application requires execution of a binary file. A separate account has been created but do not want to turn on the exec() function citing security concerns. What is the best way to go about this ? Solution : If it is a php suexec server then you can [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/php/'>PHP</a></p>
<p><strong>Issue : </strong></p>
<p>An application requires execution of a binary file. A separate account has been created but do not want to turn on the exec() function citing security concerns. What is the best way to go about this ?</p>
<p><strong>Solution : </strong></p>
<p>If it is a php suexec server then you can place a custom php.ini file under the concerned folder in the account created. Copy the content from the server php.ini but remove the required function from the &#8216;disable_function&#8217; list in the custom php.ini. This will affect only the account and not the entire server.</p>
<p>If it is not a php suexec server then place the following code in the VirtualHost entry for the domain and restart apache.</p>
<blockquote><p>< IfModule mod_php5.c ><br />
php_admin_value disable_functions &#8221; &#8221;<br />
< /IfModule ></p></blockquote>
<p>Include the functions that you want to keep disabled for the account within the quotes in the above code.</p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/security-concerns-in-executing-binary-files/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/security-concerns-in-executing-binary-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache not starting after a fresh cPanel install</title>
		<link>http://www.instacarma.com/blog/technical/apache-not-starting-after-a-fresh-cpanel-install/</link>
		<comments>http://www.instacarma.com/blog/technical/apache-not-starting-after-a-fresh-cpanel-install/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 19:36:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[mod_userdir]]></category>
		<category><![CDATA[tweak]]></category>
		<category><![CDATA[WHM]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1063</guid>
		<description><![CDATA[Filed under: apache, cPanel, mod_userdir, tweak, WHM Issue : On a brand new server with a clean cPanel install, apache does not want to start. root@server [~]# service httpd start Syntax error on line 416 of /usr/local/apache/conf/httpd.conf: UserDir &#8220;enable&#8221; keyword requires a list of usernames root@server [~]# Fix : This usually happens when Apache mod_userdir [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/cpanel/'>cPanel</a>, <a href='http://www.instacarma.com/blog/tag/mod_userdir/'>mod_userdir</a>, <a href='http://www.instacarma.com/blog/tag/tweak/'>tweak</a>, <a href='http://www.instacarma.com/blog/tag/whm/'>WHM</a></p>
<p><strong>Issue : </strong></p>
<p>On a brand new server with a clean cPanel install, apache does not want to start.</p>
<blockquote><p>root@server [~]# service httpd start<br />
Syntax error on line 416 of /usr/local/apache/conf/httpd.conf:<br />
UserDir &#8220;enable&#8221; keyword requires a list of usernames<br />
root@server [~]#</p></blockquote>
<p><strong>Fix : </strong></p>
<p>This usually happens when <em>Apache mod_userdir Tweak</em> is enabled  in WHM <strong>before</strong> adding any accounts. This creates blank <em>UserDir</em> directives  in the <em>httpd.conf</em> file which will not let Apache start.<br />
To get around this, simply disable the tweak until the first account is created.<br />
However, cPanel is reviewing this and should be fixed soon.</p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/apache-not-starting-after-a-fresh-cpanel-install/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/apache-not-starting-after-a-fresh-cpanel-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cPanel default page after IP migration</title>
		<link>http://www.instacarma.com/blog/technical/cpanel-default-page-after-ip-migration/</link>
		<comments>http://www.instacarma.com/blog/technical/cpanel-default-page-after-ip-migration/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 20:14:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[WHM]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1030</guid>
		<description><![CDATA[Filed under: apache, cPanel, DNS, IP, migration, WHM Issue : After the migration of IPs between two servers, sites are coming up with the default cPanel page. Solution : This can be due to an IP mismatch. Make sure that the DNS records and the Apache VirtualHost for the domains are configured on the same [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/cpanel/'>cPanel</a>, <a href='http://www.instacarma.com/blog/tag/dns/'>DNS</a>, <a href='http://www.instacarma.com/blog/tag/ip/'>IP</a>, <a href='http://www.instacarma.com/blog/tag/migration/'>migration</a>, <a href='http://www.instacarma.com/blog/tag/whm/'>WHM</a></p>
<p><strong>Issue : </strong></p>
<p>After the migration of IPs between two servers, sites are coming up with the default cPanel page.</p>
<p><strong>Solution : </strong></p>
<p>This can be due to an IP mismatch. Make sure that the DNS records  and the Apache VirtualHost for the domains are configured on the same IP.<br />
Check the IP in &#8220;WHM >> Show IP Address Usage&#8221; and see if it matches with the IP you get on pinging the site from your local system.</p>
<p>If there is no mismatch then it should just be a case of propagation delay.</p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/cpanel-default-page-after-ip-migration/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/cpanel-default-page-after-ip-migration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing the holding page for apache</title>
		<link>http://www.instacarma.com/blog/technical/changing-the-holding-page-for-apache/</link>
		<comments>http://www.instacarma.com/blog/technical/changing-the-holding-page-for-apache/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 17:19:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[WHM]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1024</guid>
		<description><![CDATA[Filed under: apache, cPanel, WHM Issue : When accessing the IP, it brings up the apache/cPanel success page instead of the website. Solution : If it is a shared IP then apache serves that generic page which is the default. You can manually change that by editing /usr/local/apache/htdocs OR In newer versions of cPanel, you [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/cpanel/'>cPanel</a>, <a href='http://www.instacarma.com/blog/tag/whm/'>WHM</a></p>
<p><strong>Issue : </strong></p>
<p>When accessing the IP, it brings up the apache/cPanel success page instead of the website.</p>
<p><strong>Solution : </strong></p>
<p>If it is a shared IP then apache serves that generic page which is the default.<br />
You can manually change that by editing <em>/usr/local/apache/htdocs</em> </p>
<p>OR </p>
<p>In newer versions of cPanel, you can do that via WHM > Web Template Editor > Default Website Page.</p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/changing-the-holding-page-for-apache/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/changing-the-holding-page-for-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Domain not accessible by IP/~username</title>
		<link>http://www.instacarma.com/blog/technical/domain-not-accessible-by-ipusername/</link>
		<comments>http://www.instacarma.com/blog/technical/domain-not-accessible-by-ipusername/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 17:10:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[WHM]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=1021</guid>
		<description><![CDATA[Filed under: apache, WHM Issue : The DNS has not yet propagated. Meanwhile, need to access the account via serverIP/~username but it does not work. Fix : 1. Log in to the server WHM as ‘root’. 2. Go to Main >> Security Center >> Apache mod_userdir Tweak. 3. Make sure that it is allowed for [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/whm/'>WHM</a></p>
<p><strong>Issue : </strong></p>
<p>The DNS has not yet propagated. Meanwhile, need to access the account via serverIP/~username but it does not work.</p>
<p><strong>Fix : </strong></p>
<p>1. Log in to the server WHM as ‘root’.<br />
2. Go to Main >> Security Center >> Apache mod_userdir Tweak.<br />
3. Make sure that it is allowed for the particular domain and/or the entire server.</p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/domain-not-accessible-by-ipusername/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/domain-not-accessible-by-ipusername/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pointing a sub-domain to folder outside public_html</title>
		<link>http://www.instacarma.com/blog/technical/pointing-a-sub-domain-to-folder-outside-public_html/</link>
		<comments>http://www.instacarma.com/blog/technical/pointing-a-sub-domain-to-folder-outside-public_html/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 16:35:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[subdomain]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=987</guid>
		<description><![CDATA[Filed under: apache, cPanel, ssh, subdomain Issue : When you create a sub-domain, cPanel points it to the corresponding folder under public_html by default. How to point it to a folder outside the public_html? Solution : This cannot be done via cPanel/WHM but can be achieved if you have &#8216;root&#8217; SSH access to the server. [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/cpanel/'>cPanel</a>, <a href='http://www.instacarma.com/blog/tag/ssh/'>ssh</a>, <a href='http://www.instacarma.com/blog/tag/subdomain/'>subdomain</a></p>
<p><strong>Issue : </strong></p>
<p>When you create a sub-domain, cPanel points it to the corresponding folder under public_html by default. How to point it to a folder outside the public_html?</p>
<p><strong>Solution : </strong></p>
<p>This cannot be done via cPanel/WHM but can be achieved if you have &#8216;root&#8217; SSH access to the server.</p>
<p>1. Open the apache configuration file &#8212; <em>/usr/local/apache/conf/httpd</em>.conf<br />
2. Search for the virtual host entry for your sub-domain.<br />
3. Edit the document root of your sub-domain to match the desired location.<br />
4. Save and Exit. Restart apache.</p>
<p>Note : cPanel rebuilds httpd.conf from userdata files and its overwritten on every cPanel update, on every account creation, subdomain addition, or any such activity related to apache and any manual changes you make will be overwritten. To make permanent changes to a subdomain&#8217;s root folder :</p>
<p>1. Edit the file /<em>var/cpanel/userdata/username/subdomain.domain.com file</em>, change the path and save it.<br />
2. Run  <em>/scripts/rebuildhttpdconf</em><br />
3. Restart apache.</p>
<p>To learn how you can preserve the changes in httpd.conf during EasyApache, click <a href="http://instacarma.com/blog/technical/preserving-httpd-conf-during-easyapache/">here</a>.</p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/pointing-a-sub-domain-to-folder-outside-public_html/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/pointing-a-sub-domain-to-folder-outside-public_html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling the PHP extension&#8211;FreeType</title>
		<link>http://www.instacarma.com/blog/technical/enabling-the-php-extension-freetype/</link>
		<comments>http://www.instacarma.com/blog/technical/enabling-the-php-extension-freetype/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 20:34:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WHM]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=840</guid>
		<description><![CDATA[Filed under: apache, cPanel, PHP, WHM Issue : How to enable the PHP extension&#8211;FreeType on a server running cPanel/WHM and apache? Solution : You need to re-compile apache and php with freetype . This can be done via the command line or through WHM. Command line : Run /scripts/easyapache and select &#8220;ttf&#8221; for freetype. WHM: [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/cpanel/'>cPanel</a>, <a href='http://www.instacarma.com/blog/tag/php/'>PHP</a>, <a href='http://www.instacarma.com/blog/tag/whm/'>WHM</a></p>
<p><strong>Issue : </strong></p>
<p>How to enable the PHP extension&#8211;FreeType on a server running cPanel/WHM and apache?</p>
<p><strong>Solution : </strong></p>
<p>You need to re-compile apache and php with freetype . This can be done via the command line or through WHM.</p>
<p><em>Command line : </em><br />
Run <em>/scripts/easyapache</em> and select &#8220;ttf&#8221; for freetype.</p>
<p><em>WHM:</em><br />
You can enable freetype via WHM >> software >> Apache Update >> Load Previous Config and select TTF(FreeType)<br />
Start Build</p>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/enabling-the-php-extension-freetype/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/enabling-the-php-extension-freetype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redirecting every page on the website to index.html</title>
		<link>http://www.instacarma.com/blog/technical/redirecting-every-page-on-website-to-index-html/</link>
		<comments>http://www.instacarma.com/blog/technical/redirecting-every-page-on-website-to-index-html/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 18:02:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=823</guid>
		<description><![CDATA[Filed under: apache, redirect Issue : While some construction is going on the site, all pages on the website should go to the index page. Solution : This can be easily achieved by using the following code in your .htaccess file : < IfModule mod_rewrite.c > RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/redirect/'>redirect</a></p>
<p><strong>Issue : </strong></p>
<p>While some construction is going on the site, all pages on the website should go to the index page.</p>
<p><strong>Solution : </strong></p>
<p>This can be easily achieved by using the following code in your .htaccess file :</p>
<blockquote><p>
< IfModule mod_rewrite.c ><br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /index.html [L]<br />
< /IfModule ></p></blockquote>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/redirecting-every-page-on-website-to-index-html/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/redirecting-every-page-on-website-to-index-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disabling /whm and /cpanel for all domains except the hostname</title>
		<link>http://www.instacarma.com/blog/technical/disabling-whm-and-cpanel-for-all-domains-except-the-hostname/</link>
		<comments>http://www.instacarma.com/blog/technical/disabling-whm-and-cpanel-for-all-domains-except-the-hostname/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 18:06:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[WHM]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=821</guid>
		<description><![CDATA[Filed under: apache, cPanel, WHM Issue : How to disable access to /whm and /cpanel for all domains except the server hostname? Solution : This would need customization of the httpd.conf file. First, edit the httpd.conf and remove any lines pertaining to forwarding of domains to /cpanel and /whm. Secondly, run the following command to [...]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/cpanel/'>cPanel</a>, <a href='http://www.instacarma.com/blog/tag/whm/'>WHM</a></p>
<p><strong>Issue : </strong></p>
<p>How to disable access to /whm and /cpanel for all domains except the server hostname?</p>
<p><strong>Solution : </strong></p>
<p>This would need customization of the httpd.conf file.</p>
<p>First, edit the httpd.conf and  remove any lines pertaining to forwarding of domains to /cpanel and /whm.<br />
Secondly, run the following command to distill the file :</p>
<blockquote><p>/usr/local/cpanel/bin/apache_conf_distiller &#8211;update &#8211;main</p></blockquote>
<p>Finally, restart Apache.</p>
<blockquote><p>service httpd restart</p></blockquote>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/disabling-whm-and-cpanel-for-all-domains-except-the-hostname/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/disabling-whm-and-cpanel-for-all-domains-except-the-hostname/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>htaccess code for redirecting www to non-www</title>
		<link>http://www.instacarma.com/blog/technical/htaccess-code-for-redirecting-www-to-non-www/</link>
		<comments>http://www.instacarma.com/blog/technical/htaccess-code-for-redirecting-www-to-non-www/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 16:54:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quick fixes]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://instacarma.com/blog/?p=797</guid>
		<description><![CDATA[Filed under: apache, redirect Issue : Regardless of somebody accessing the site with or without the &#8216;www&#8217; , it should always go to http://domain.com Solution : Use the following htaccess code : RewriteEngine on RewriteCond %{HTTP_HOST} ^www.domain.com RewriteRule ^(.*) http://domain.com/$1 [R]]]></description>
			<content:encoded><![CDATA[<p>Filed under: <a href='http://www.instacarma.com/blog/tag/apache/'>apache</a>, <a href='http://www.instacarma.com/blog/tag/redirect/'>redirect</a></p>
<p><strong>Issue : </strong></p>
<p>Regardless of somebody accessing the site with or without the &#8216;www&#8217; , it should always go to http://domain.com</p>
<p><strong>Solution : </strong></p>
<p>Use the following htaccess code : </p>
<blockquote><p>RewriteEngine on<br />
RewriteCond %{HTTP_HOST} ^www.domain.com<br />
RewriteRule ^(.*) http://domain.com/$1 [R]
</p></blockquote>
<div class="alignright"><div class="g-plusone" data-href="http://www.instacarma.com/blog/technical/htaccess-code-for-redirecting-www-to-non-www/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.instacarma.com/blog/technical/htaccess-code-for-redirecting-www-to-non-www/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

