<?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>HM2K.com &#187; cPanel</title>
	<atom:link href="http://www.hm2k.com/posts/category/sysadmin/cpanel/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hm2k.com</link>
	<description>The research of an internet entrepreneur and IT consultant</description>
	<lastBuildDate>Thu, 25 Feb 2010 22:02:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Domain example.com has exceeded the max emails per hour (200) allowed. Message discarded.</title>
		<link>http://www.hm2k.com/posts/domain-example-com-has-exceeded-the-max-emails-per-hour-200-allowed-message-discarded</link>
		<comments>http://www.hm2k.com/posts/domain-example-com-has-exceeded-the-max-emails-per-hour-200-allowed-message-discarded#comments</comments>
		<pubDate>Wed, 15 Jul 2009 15:34:36 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[cPanel]]></category>
		<category><![CDATA[emails per hour]]></category>
		<category><![CDATA[exceeded]]></category>
		<category><![CDATA[max]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=426</guid>
		<description><![CDATA[<p>Got this error with cpanel?</p>
<blockquote><p>Domain example.com has exceeded the max emails per hour (200) allowed. Message discarded.</p></blockquote>
<p>The fix is simple&#8230;<span id="more-426"></span></p>
<blockquote><p>echo example.com=10000 &gt;&gt; /var/cpanel/maxemails</p></blockquote>
<p>The result is this:</p>
<blockquote><p>root@server [/]# cat /var/cpanel/maxemails<br />
# If you update this file you must run /scripts/build_maxemails_config<br />
example.com=10000</p></blockquote>
<p>Change &#8220;example.com&#8221; for your domain and change &#8220;10000&#8243; for your max. Don&#8217;t forget to run the script.</p>
<p>Enjoy!</p>
]]></description>
			<content:encoded><![CDATA[<p>Got this error with cpanel?</p>
<blockquote><p>Domain example.com has exceeded the max emails per hour (200) allowed. Message discarded.</p></blockquote>
<p>The fix is simple&#8230;<span id="more-426"></span></p>
<blockquote><p>echo example.com=10000 &gt;&gt; /var/cpanel/maxemails</p></blockquote>
<p>The result is this:</p>
<blockquote><p>root@server [/]# cat /var/cpanel/maxemails<br />
# If you update this file you must run /scripts/build_maxemails_config<br />
example.com=10000</p></blockquote>
<p>Change &#8220;example.com&#8221; for your domain and change &#8220;10000&#8243; for your max. Don&#8217;t forget to run the script.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/domain-example-com-has-exceeded-the-max-emails-per-hour-200-allowed-message-discarded/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>suPHP and .phps PHP code highlighting support</title>
		<link>http://www.hm2k.com/posts/suphp-and-phps</link>
		<comments>http://www.hm2k.com/posts/suphp-and-phps#comments</comments>
		<pubDate>Thu, 17 Jul 2008 12:27:12 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[cPanel]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=214</guid>
		<description><![CDATA[<p>Today a user on one of my web servers asked me why .phps files would only download and not show the highlighted PHP code as expected.</p>
<p>This is usually done by adding the following to your &#8220;httpd.conf&#8221;&#8230;</p>
<blockquote><p>AddType &#8216;application/x-httpd-php-source&#8217; .phps</p></blockquote>
<p>We use the cPanel web hosting control panel and to improve security <a href="http://www.cpanel.net/support/docs/ea/ea3/ea3php_hardening_php.html">cPanel recommend using suPHP</a>, which allows PHP scripts to run as a user rather than &#8220;nobody&#8221;.</p>
<p>This means that adding the above line to &#8220;httpd.conf&#8221; <a href="http://lists.marsching.com/pipermail/suphp/2005-January/000638.html">does not work with suPHP</a>.</p>
<p>So what can be done?</p>
<p><span id="more-214"></span></p>
<p>The official word is located in the <a href="http://www.suphp.org/FAQ.html">suPHP FAQ</a>, which says:</p>
<blockquote><p><strong> Does suPHP support code highlighting by using the &#8220;.phps&#8221; extension?</strong></p>
<p>suPHP itself has no support for code highlighting. The main reason      is that PHP-CGI does not support any input parameter to activate      code highlighting. However there is a solution based on a small      PHP script and some rewrite rules. You can find the discussion at      <a href="http://forums.macosxhints.com/archive/index.php/t-23595.html">http://forums.macosxhints.com/archive/index.php/t-23595.html</a>.</p></blockquote>
<p>So I decided to checkout the suggested link.</p>
<p>I noticed that even though the FAQ suggested using rewrite rules, the forum did not provide any kind of working solution.</p>
<p>Using the PHP code supplied, and a bit of rewrite ingenuity we can get this working as expected.</p>
<p>First, create a file called &#8220;phpsource.php&#8221;, in this file paste the following code:</p>
<blockquote><p>&lt;?php<br />
if (substr($_GET['file'],strpos($_GET['file'],&#8217;.')) == &#8216;.phps&#8217;) {<br />
highlight_file($_GET['file']);<br />
}<br />
?&gt;</p></blockquote>
<p>Then, in your &#8220;.htaccess&#8221;, paste the following code:</p>
<blockquote><p>RewriteRule ^(.+\.phps)$ phpsource.php?file=$1 [L]</p>
<p><em>Note: If you don&#8217;t already have rewrites turned on </em><em>in your &#8220;.htaccess&#8221; file,</em><em> you will also need the line &#8220;RewriteEngine On&#8221; at the top.</em></p></blockquote>
<p>What this will do is pass all &#8220;.phps&#8221; files through your &#8220;phpsource.php&#8221; script, and output a highlighted version.</p>
<p>The benefits of this solution is that it&#8217;s portable (will work on any server); it won&#8217;t(/shouldn&#8217;t) break when you upgrade apache or PHP; it&#8217;s pretty secure as it&#8217;ll only handle .phps files, as expected; it&#8217;s quick and effective.</p>
]]></description>
			<content:encoded><![CDATA[<p>Today a user on one of my web servers asked me why .phps files would only download and not show the highlighted PHP code as expected.</p>
<p>This is usually done by adding the following to your &#8220;httpd.conf&#8221;&#8230;</p>
<blockquote><p>AddType &#8216;application/x-httpd-php-source&#8217; .phps</p></blockquote>
<p>We use the cPanel web hosting control panel and to improve security <a href="http://www.cpanel.net/support/docs/ea/ea3/ea3php_hardening_php.html">cPanel recommend using suPHP</a>, which allows PHP scripts to run as a user rather than &#8220;nobody&#8221;.</p>
<p>This means that adding the above line to &#8220;httpd.conf&#8221; <a href="http://lists.marsching.com/pipermail/suphp/2005-January/000638.html">does not work with suPHP</a>.</p>
<p>So what can be done?</p>
<p><span id="more-214"></span></p>
<p>The official word is located in the <a href="http://www.suphp.org/FAQ.html">suPHP FAQ</a>, which says:</p>
<blockquote><p><strong> Does suPHP support code highlighting by using the &#8220;.phps&#8221; extension?</strong></p>
<p>suPHP itself has no support for code highlighting. The main reason      is that PHP-CGI does not support any input parameter to activate      code highlighting. However there is a solution based on a small      PHP script and some rewrite rules. You can find the discussion at      <a href="http://forums.macosxhints.com/archive/index.php/t-23595.html">http://forums.macosxhints.com/archive/index.php/t-23595.html</a>.</p></blockquote>
<p>So I decided to checkout the suggested link.</p>
<p>I noticed that even though the FAQ suggested using rewrite rules, the forum did not provide any kind of working solution.</p>
<p>Using the PHP code supplied, and a bit of rewrite ingenuity we can get this working as expected.</p>
<p>First, create a file called &#8220;phpsource.php&#8221;, in this file paste the following code:</p>
<blockquote><p>&lt;?php<br />
if (substr($_GET['file'],strpos($_GET['file'],&#8217;.')) == &#8216;.phps&#8217;) {<br />
highlight_file($_GET['file']);<br />
}<br />
?&gt;</p></blockquote>
<p>Then, in your &#8220;.htaccess&#8221;, paste the following code:</p>
<blockquote><p>RewriteRule ^(.+\.phps)$ phpsource.php?file=$1 [L]</p>
<p><em>Note: If you don&#8217;t already have rewrites turned on </em><em>in your &#8220;.htaccess&#8221; file,</em><em> you will also need the line &#8220;RewriteEngine On&#8221; at the top.</em></p></blockquote>
<p>What this will do is pass all &#8220;.phps&#8221; files through your &#8220;phpsource.php&#8221; script, and output a highlighted version.</p>
<p>The benefits of this solution is that it&#8217;s portable (will work on any server); it won&#8217;t(/shouldn&#8217;t) break when you upgrade apache or PHP; it&#8217;s pretty secure as it&#8217;ll only handle .phps files, as expected; it&#8217;s quick and effective.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/suphp-and-phps/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Storing mySQL database settings for php and perl in one file</title>
		<link>http://www.hm2k.com/posts/storing-mysql-database-settings-for-php-and-perl-in-one-file</link>
		<comments>http://www.hm2k.com/posts/storing-mysql-database-settings-for-php-and-perl-in-one-file#comments</comments>
		<pubDate>Fri, 29 Feb 2008 11:36:10 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[cPanel]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/posts/storing-mysql-database-settings-for-php-and-perl-in-one-file</guid>
		<description><![CDATA[<p>I have a situation where there&#8217;s two scripts.</p>
<ol>
<li>The main core of the code which is PHP based.</li>
<li>A perl script which is called by the mail server for parsing incoming mail.</li>
</ol>
<p>Both of these scripts require database access to the same database.</p>
<p><span id="more-173"></span>Previously the solution would be to have two separate files both containing effectively the same information. This is less than ideal, nobody wants settings in two places.</p>
<p>Some have suggested using SETENV with apache, however although this would work fine for the PHP aspect, it wouldn&#8217;t work for the perl script as it&#8217;s not called via apache.</p>
<p>Some have suggested using ini files, then using <a href="http://www.php.net/parse_ini_file">parse_ini_file</a> for php, and the ini parser module in perl. My problem with this was that because ini files read as plain text, it becomes a security problem. It is argued that you could deny access using apache&#8217;s &#8220;.htaccess&#8221;, or put the file outside of the web directory (usually public_html). I didn&#8217;t think this was suitable.</p>
<p>After some thought, and a little assistance I propose the following solution:</p>
<p>Create settings.pl:</p>
<blockquote><p>#!/usr/local/bin/perl</p>
<p>$db_type = &#8216;mysql&#8217;;<br />
$db_host = &#8216;localhost&#8217;;<br />
$db_name = &#8221;;<br />
$db_user = &#8221;;<br />
$db_pass = &#8221;;</p></blockquote>
<p>Hey presto, we now have 1 settings file that works for both perl and PHP.</p>
<p><em>Note: If you&#8217;re using strict in perl, you&#8217;ll need to define the variables before you include the settings file, otherwise it will complain.<br />
</em></p>
<p>The problem is that php won&#8217;t evaluate the code, so we need to create another file, that will read the settings and evaluate them for use with PHP.</p>
<p>Create settings.php</p>
<blockquote><p>&lt;?php</p>
<p>$c = file_get_contents(&#8217;settings.pl&#8217;);<br />
eval($c);</p>
<p>?&gt;</p></blockquote>
<p>Problem solved. Enjoy!</p>
<p>Update: After some discussion it was suggested that another way would be to create an ini file, and simply rename it to a file that has a handler in your httpd (such as .pl or .cgi NOT .php as PHP would render it as plain text), then in perl you can use the parser such as <a href="http://search.cpan.org/~kirsle/Config-INI-Simple-0.02/lib/Config/INI/Simple.pm">Config::INI</a> to read the file and in PHP use <a href="http://www.php.net/parse_ini_file">parse_ini_file</a>(). The obvious downside to this is the additional overheads that the above method simply does not have. If you have a large amount of settings, it might be worth it.</p>
]]></description>
			<content:encoded><![CDATA[<p>I have a situation where there&#8217;s two scripts.</p>
<ol>
<li>The main core of the code which is PHP based.</li>
<li>A perl script which is called by the mail server for parsing incoming mail.</li>
</ol>
<p>Both of these scripts require database access to the same database.</p>
<p><span id="more-173"></span>Previously the solution would be to have two separate files both containing effectively the same information. This is less than ideal, nobody wants settings in two places.</p>
<p>Some have suggested using SETENV with apache, however although this would work fine for the PHP aspect, it wouldn&#8217;t work for the perl script as it&#8217;s not called via apache.</p>
<p>Some have suggested using ini files, then using <a href="http://www.php.net/parse_ini_file">parse_ini_file</a> for php, and the ini parser module in perl. My problem with this was that because ini files read as plain text, it becomes a security problem. It is argued that you could deny access using apache&#8217;s &#8220;.htaccess&#8221;, or put the file outside of the web directory (usually public_html). I didn&#8217;t think this was suitable.</p>
<p>After some thought, and a little assistance I propose the following solution:</p>
<p>Create settings.pl:</p>
<blockquote><p>#!/usr/local/bin/perl</p>
<p>$db_type = &#8216;mysql&#8217;;<br />
$db_host = &#8216;localhost&#8217;;<br />
$db_name = &#8221;;<br />
$db_user = &#8221;;<br />
$db_pass = &#8221;;</p></blockquote>
<p>Hey presto, we now have 1 settings file that works for both perl and PHP.</p>
<p><em>Note: If you&#8217;re using strict in perl, you&#8217;ll need to define the variables before you include the settings file, otherwise it will complain.<br />
</em></p>
<p>The problem is that php won&#8217;t evaluate the code, so we need to create another file, that will read the settings and evaluate them for use with PHP.</p>
<p>Create settings.php</p>
<blockquote><p>&lt;?php</p>
<p>$c = file_get_contents(&#8217;settings.pl&#8217;);<br />
eval($c);</p>
<p>?&gt;</p></blockquote>
<p>Problem solved. Enjoy!</p>
<p>Update: After some discussion it was suggested that another way would be to create an ini file, and simply rename it to a file that has a handler in your httpd (such as .pl or .cgi NOT .php as PHP would render it as plain text), then in perl you can use the parser such as <a href="http://search.cpan.org/~kirsle/Config-INI-Simple-0.02/lib/Config/INI/Simple.pm">Config::INI</a> to read the file and in PHP use <a href="http://www.php.net/parse_ini_file">parse_ini_file</a>(). The obvious downside to this is the additional overheads that the above method simply does not have. If you have a large amount of settings, it might be worth it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/storing-mysql-database-settings-for-php-and-perl-in-one-file/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing IonCube Loader with cPanel on CentOS</title>
		<link>http://www.hm2k.com/posts/installing-ioncube-loader-with-cpanel-on-centos</link>
		<comments>http://www.hm2k.com/posts/installing-ioncube-loader-with-cpanel-on-centos#comments</comments>
		<pubDate>Tue, 09 Oct 2007 01:13:46 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cPanel]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/posts/installing-ioncube-loader-with-cpanel-on-centos</guid>
		<description><![CDATA[<p>There seems to be limited details of how this is done. It&#8217;s fairly simple to be honest, but I felt it could save somebody some time if it was documented.</p>
<p>In case you were wondering IonCube is a PHP encoder, usually used to stop people stealing your PHP code when you distribute it. Consequently to run the encoded PHP you require a &#8220;loader&#8221;, which will run it correctly.</p>
<p><span id="more-135"></span>If your server does not have IonCube loader installed these are the steps you need to take.</p>
<ol>
<li> Visit the <a href="http://www.ioncube.com/loaders.php">IonCube loader</a> page and choose a download for your operating system.
<ul>
<li>In this case we will be selecting the Linux (x86) &#8220;.tar.gz&#8221; <a href="http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz">download</a> for CentOS 4.</li>
</ul>
</li>
<li>Use &#8220;cd&#8221; to go to your home directory (usually /root).</li>
<li>You need to download the file, issue: wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz</li>
<li>Next, extract the files from the tarball, issue: tar zxvf ioncube_loaders_lin_x86.tar.gz</li>
<li>We now need to move the directory to the correct path, issue: mv ioncube /usr/local</li>
<li>Next we need to change our active directory, issue: cd /usr/local/ioncube</li>
<li>We now need to find out where the &#8220;php.ini&#8221; is stored, issue: php ioncube-loader-helper.php page=install-assistant
<ul>
<li>You should see something similar to &#8220;&lt;code&gt;/usr/local/Zend/etc/php.ini&lt;/code&gt;&#8221;.</li>
<li>Also take note of the part that says &#8220;ioncube_loader_lin_4.4.so&#8221; we will use this file later.</li>
</ul>
</li>
<li>Next we need to edit the file, issue: nano /usr/local/Zend/etc/php.ini
<ul>
<li>You can use any editor you like such as nano/pico or vi if you know what you&#8217;re doing.</li>
</ul>
</li>
<li>Find (ctrl+w) the &#8220;[Zend]&#8221; section of the &#8220;php.ini&#8221;, above the &#8220;zend_extension&#8221; line, place: <span class="green">zend_extension = /usr/local/ioncube/ioncube_loader_lin_4.4.so (followed by ctrl+x, Y then enter if using pico or nano).</span></li>
<li><span class="green">Finally issue: service httpd restart </span></li>
</ol>
]]></description>
			<content:encoded><![CDATA[<p>There seems to be limited details of how this is done. It&#8217;s fairly simple to be honest, but I felt it could save somebody some time if it was documented.</p>
<p>In case you were wondering IonCube is a PHP encoder, usually used to stop people stealing your PHP code when you distribute it. Consequently to run the encoded PHP you require a &#8220;loader&#8221;, which will run it correctly.</p>
<p><span id="more-135"></span>If your server does not have IonCube loader installed these are the steps you need to take.</p>
<ol>
<li> Visit the <a href="http://www.ioncube.com/loaders.php">IonCube loader</a> page and choose a download for your operating system.
<ul>
<li>In this case we will be selecting the Linux (x86) &#8220;.tar.gz&#8221; <a href="http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz">download</a> for CentOS 4.</li>
</ul>
</li>
<li>Use &#8220;cd&#8221; to go to your home directory (usually /root).</li>
<li>You need to download the file, issue: wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz</li>
<li>Next, extract the files from the tarball, issue: tar zxvf ioncube_loaders_lin_x86.tar.gz</li>
<li>We now need to move the directory to the correct path, issue: mv ioncube /usr/local</li>
<li>Next we need to change our active directory, issue: cd /usr/local/ioncube</li>
<li>We now need to find out where the &#8220;php.ini&#8221; is stored, issue: php ioncube-loader-helper.php page=install-assistant
<ul>
<li>You should see something similar to &#8220;&lt;code&gt;/usr/local/Zend/etc/php.ini&lt;/code&gt;&#8221;.</li>
<li>Also take note of the part that says &#8220;ioncube_loader_lin_4.4.so&#8221; we will use this file later.</li>
</ul>
</li>
<li>Next we need to edit the file, issue: nano /usr/local/Zend/etc/php.ini
<ul>
<li>You can use any editor you like such as nano/pico or vi if you know what you&#8217;re doing.</li>
</ul>
</li>
<li>Find (ctrl+w) the &#8220;[Zend]&#8221; section of the &#8220;php.ini&#8221;, above the &#8220;zend_extension&#8221; line, place: <span class="green">zend_extension = /usr/local/ioncube/ioncube_loader_lin_4.4.so (followed by ctrl+x, Y then enter if using pico or nano).</span></li>
<li><span class="green">Finally issue: service httpd restart </span></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/installing-ioncube-loader-with-cpanel-on-centos/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>The requested URL /cpanel was not found on this server</title>
		<link>http://www.hm2k.com/posts/the-requested-url-cpanel-was-not-found-on-this-server</link>
		<comments>http://www.hm2k.com/posts/the-requested-url-cpanel-was-not-found-on-this-server#comments</comments>
		<pubDate>Mon, 11 Jun 2007 15:40:43 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[cPanel]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/posts/the-requested-url-cpanel-was-not-found-on-this-server</guid>
		<description><![CDATA[<p>If you run cPanel servers, then you may at some point experience this issue.</p>
<p>The problem is when you attempt to visit &#8220;http://server.example.com/cpanel&#8221; and you get the following message or similar:</p>
<blockquote><p>The requested URL /cpanel was not found on this server.</p>
<p>The requested URL /whm was not found on this server.</p></blockquote>
<p><span id="more-122"></span>To fix this, you must add the following to your httpd.conf (/usr/local/apache/conf/httpd.conf):</p>
<blockquote>
<pre>ErrorDocument 400 /400.shtml
ErrorDocument 401 /401.shtml
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml
ScriptAlias /cgi-sys/ /usr/local/cpanel/cgi-sys/
Alias /sys_cpanel/ /usr/local/cpanel/sys_cpanel/
Alias /java-sys/ /usr/local/cpanel/java-sys/
Alias /img-sys/ /usr/local/cpanel/img-sys/
Alias /akopia/ /usr/local/cpanel/3rdparty/interchange/share/akopia/
Alias /neo-images/ /usr/local/cpanel/base/neomail/neo-images/
ScriptAliasMatch ^/cpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /cpanel /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /whm /usr/local/cpanel/cgi-sys/whmredirect.cgi
ScriptAlias /securewhm /usr/local/cpanel/cgi-sys/swhmredirect.cgi
ScriptAlias /webmail /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/webmail/(.*) /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/kpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /controlpanel /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /securecontrolpanel /usr/local/cpanel/cgi-sys/sredirect.cgi
Alias /mailman/archives/ /usr/local/cpanel/3rdparty/mailman/archives/public/
ScriptAlias /mailman/ /usr/local/cpanel/3rdparty/mailman/cgi-bin/
Alias /pipermail/ /usr/local/cpanel/3rdparty/mailman/archives/public/
Alias /interchange/ /usr/local/cpanel/3rdparty/interchange/share/interchange/
Alias /interchange-5/ /usr/local/cpanel/3rdparty/interchange/share/interchange-5/</pre>
</blockquote>
<p>Add this anywhere in the httpd.conf, outside of any &lt;VirtualHost&gt; tags.</p>
<p>Restart apache (service httpd restart), and bingo!</p>
]]></description>
			<content:encoded><![CDATA[<p>If you run cPanel servers, then you may at some point experience this issue.</p>
<p>The problem is when you attempt to visit &#8220;http://server.example.com/cpanel&#8221; and you get the following message or similar:</p>
<blockquote><p>The requested URL /cpanel was not found on this server.</p>
<p>The requested URL /whm was not found on this server.</p></blockquote>
<p><span id="more-122"></span>To fix this, you must add the following to your httpd.conf (/usr/local/apache/conf/httpd.conf):</p>
<blockquote>
<pre>ErrorDocument 400 /400.shtml
ErrorDocument 401 /401.shtml
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml
ScriptAlias /cgi-sys/ /usr/local/cpanel/cgi-sys/
Alias /sys_cpanel/ /usr/local/cpanel/sys_cpanel/
Alias /java-sys/ /usr/local/cpanel/java-sys/
Alias /img-sys/ /usr/local/cpanel/img-sys/
Alias /akopia/ /usr/local/cpanel/3rdparty/interchange/share/akopia/
Alias /neo-images/ /usr/local/cpanel/base/neomail/neo-images/
ScriptAliasMatch ^/cpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /cpanel /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /whm /usr/local/cpanel/cgi-sys/whmredirect.cgi
ScriptAlias /securewhm /usr/local/cpanel/cgi-sys/swhmredirect.cgi
ScriptAlias /webmail /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/webmail/(.*) /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/kpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /controlpanel /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /securecontrolpanel /usr/local/cpanel/cgi-sys/sredirect.cgi
Alias /mailman/archives/ /usr/local/cpanel/3rdparty/mailman/archives/public/
ScriptAlias /mailman/ /usr/local/cpanel/3rdparty/mailman/cgi-bin/
Alias /pipermail/ /usr/local/cpanel/3rdparty/mailman/archives/public/
Alias /interchange/ /usr/local/cpanel/3rdparty/interchange/share/interchange/
Alias /interchange-5/ /usr/local/cpanel/3rdparty/interchange/share/interchange-5/</pre>
</blockquote>
<p>Add this anywhere in the httpd.conf, outside of any &lt;VirtualHost&gt; tags.</p>
<p>Restart apache (service httpd restart), and bingo!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/the-requested-url-cpanel-was-not-found-on-this-server/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
