<?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>LAMPdocs: Linux, Apache, MySQL, PHP &#187; Apache Performance</title>
	<atom:link href="http://www.lampdocs.com/blog/category/apache-performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lampdocs.com/blog</link>
	<description>Linux, Apache, MySQL, PHP: Docs, Tricks and Secrets</description>
	<lastBuildDate>Wed, 04 Jan 2012 13:11:27 +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>How to Upgrade Apache From 1.3 to 2.0 on a Directadmin Server</title>
		<link>http://www.lampdocs.com/blog/2008/10/how-to-upgrade-apache-from-13-to-20-on-a-directadmin-server/</link>
		<comments>http://www.lampdocs.com/blog/2008/10/how-to-upgrade-apache-from-13-to-20-on-a-directadmin-server/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 18:15:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache Performance]]></category>
		<category><![CDATA[Directadmin Tricks]]></category>
		<category><![CDATA[directadmin apache 1.3 upgrade apache 2]]></category>
		<category><![CDATA[directadmin apache 2]]></category>
		<category><![CDATA[directadmin apache upgrade]]></category>
		<category><![CDATA[directadmin apache2]]></category>
		<category><![CDATA[directadmin upgrade apache]]></category>
		<category><![CDATA[how to install apache 2]]></category>
		<category><![CDATA[how-to upgrade apache]]></category>
		<category><![CDATA[steps to complie apache on directadmin]]></category>
		<category><![CDATA[upgrade apache on directadmin]]></category>
		<category><![CDATA[upgrade apache to 2.0 directadmin]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=226</guid>
		<description><![CDATA[When you get your new Directadmin server, it comes with default settings like Apache 1.3 and PHP4. I have already written how to update PHP version to PHP5. Today I will post a solution that can be used to upgrade your apache installation on a Directadmin server. The idea is not mine, it is taken [...]]]></description>
			<content:encoded><![CDATA[<p>When you get your new Directadmin server, it comes with default settings like Apache 1.3 and PHP4. I have already written how to update PHP version to PHP5. Today I will post a solution that can be used to upgrade your apache installation on a Directadmin server.</p>
<p>The idea is not mine, it is taken from <a href="http://directadmin.com/features.php?id=441">Directadmin Official Site</a> and is also listed on <a href="http://www.directadmin.com/forum/showthread.php?threadid=13173">Directadmin Forum</a>. I will post it here as I am trying to create a comprehensive guide on how to deal with Linux servers. So, first of all we need to have root access, and I&#8217;d advise you to shut down Apache before trying to update it. The command is</p>
<blockquote><p>service httpd stop</p></blockquote>
<p>Next you need to do the following list of commands:</p>
<blockquote><p>cd /usr/local/directadmin/customapache<br />
./build update<br />
./build clean<br />
./build update_data_ap2<br />
./build convert<br />
./build apache_2<br />
./build php_ap2 n<br />
./build mod_frontpage_ap2<br />
./build mod_perl_ap2<br />
/sbin/service httpd restart</p></blockquote>
<p>This will download and install the latest Apache build and will compile it with most used modules. After the Apache is rebooted, your changes are applied and you should have a fully functional version of Apache. I just performed this action on the VPS where this site is located in order to improve its performance. I recommend you to do the same.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/10/how-to-upgrade-apache-from-13-to-20-on-a-directadmin-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Find Which Script Causes Most Apache Load</title>
		<link>http://www.lampdocs.com/blog/2008/10/how-to-find-which-script-causes-most-apache-load/</link>
		<comments>http://www.lampdocs.com/blog/2008/10/how-to-find-which-script-causes-most-apache-load/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 09:15:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache Performance]]></category>
		<category><![CDATA[apache load detect]]></category>
		<category><![CDATA[apache load php]]></category>
		<category><![CDATA[apache requests stats]]></category>
		<category><![CDATA[detect apache process php load]]></category>
		<category><![CDATA[investigate apache load]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=212</guid>
		<description><![CDATA[It is often hard to tell which process causes most Apache load. top and ps -aux commands don&#8217;t give us anything usable; they only allow us to see that Apache causes server load. We need to identify which scripts are not so good for server load and fix them. The first advice is to view [...]]]></description>
			<content:encoded><![CDATA[<p>It is often hard to tell which process causes most Apache load. top and ps -aux commands don&#8217;t give us anything usable; they only allow us to see that Apache causes <a href="http://www.lampdocs.com/blog/tag/server-load/" class="st_tag internal_tag" rel="tag" title="Posts tagged with server load">server load</a>. We need to identify which scripts are not so good for <a href="http://www.lampdocs.com/blog/tag/server-load/" class="st_tag internal_tag" rel="tag" title="Posts tagged with server load">server load</a> and fix them.</p>
<p>The first advice is to view Apache server status. I have already written how to enable it <a href="http://www.lampdocs.com/blog/2008/04/29/viewing-apache-server-status-from-your-browser/">here</a>. This will allow you to monitor Apache requests and will show you which requests are most popular and which of them cause problems.</p>
<p>If you have many users on your server, suphp might help you to identify the problem. As all php scripts are run by corresponding user, you will be able to identify which user causes most server load related to Apache.</p>
<p>This article does not describe the process of identification of MySQL server load. Maybe I will write about it later.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/10/how-to-find-which-script-causes-most-apache-load/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Check if Apache Is Up and Restart if Not</title>
		<link>http://www.lampdocs.com/blog/2008/09/how-to-check-if-apache-is-up-and-restart-if-not/</link>
		<comments>http://www.lampdocs.com/blog/2008/09/how-to-check-if-apache-is-up-and-restart-if-not/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 04:28:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache Performance]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[apache check status]]></category>
		<category><![CDATA[apache freetype support]]></category>
		<category><![CDATA[apache on netbook]]></category>
		<category><![CDATA[apache status]]></category>
		<category><![CDATA[check apache is running]]></category>
		<category><![CDATA[check apache running]]></category>
		<category><![CDATA[check apache status]]></category>
		<category><![CDATA[check apache status in linux]]></category>
		<category><![CDATA[check for apache restart]]></category>
		<category><![CDATA[check if apache is running]]></category>
		<category><![CDATA[check if apache is running linux]]></category>
		<category><![CDATA[check if apache is working]]></category>
		<category><![CDATA[check if apache running]]></category>
		<category><![CDATA[check if apache running linux]]></category>
		<category><![CDATA[check status apache]]></category>
		<category><![CDATA[check status of apache]]></category>
		<category><![CDATA[check that apache runs]]></category>
		<category><![CDATA[check to see if apache is running]]></category>
		<category><![CDATA[check whether apache is running linux]]></category>
		<category><![CDATA[checking apache status]]></category>
		<category><![CDATA[checking if apache is running]]></category>
		<category><![CDATA[checking if apache is up]]></category>
		<category><![CDATA[checking that apache is running Linux]]></category>
		<category><![CDATA[determine if apache is running]]></category>
		<category><![CDATA[determine if apache is running on redhat]]></category>
		<category><![CDATA[directadmin apache]]></category>
		<category><![CDATA[directadmin disable apache]]></category>
		<category><![CDATA[how can i tell if apache is running]]></category>
		<category><![CDATA[how do you tell if apache is running]]></category>
		<category><![CDATA[how to check apache is running in linux]]></category>
		<category><![CDATA[how to check apache status]]></category>
		<category><![CDATA[how to check if apache is installed on linux]]></category>
		<category><![CDATA[how to check if apache is running]]></category>
		<category><![CDATA[how to check if apache is running in linux]]></category>
		<category><![CDATA[how to check if apache is running on linux]]></category>
		<category><![CDATA[how to check if apache is running shell]]></category>
		<category><![CDATA[how to check if apache is up and running]]></category>
		<category><![CDATA[how to check if apache is working]]></category>
		<category><![CDATA[how to check if apache running]]></category>
		<category><![CDATA[how to check if apache server is running]]></category>
		<category><![CDATA[how to check if your apache is running]]></category>
		<category><![CDATA[how to check whether apache is running]]></category>
		<category><![CDATA[how to check whether apache is running or not]]></category>
		<category><![CDATA[how to determine if apache is running]]></category>
		<category><![CDATA[how to find if apache is running]]></category>
		<category><![CDATA[how to see if apache is running]]></category>
		<category><![CDATA[how to tell if apache is running]]></category>
		<category><![CDATA[how to test if apache is running]]></category>
		<category><![CDATA[linux apache check is running]]></category>
		<category><![CDATA[linux check apache status]]></category>
		<category><![CDATA[linux check if apache is running]]></category>
		<category><![CDATA[linux check if apache runs]]></category>
		<category><![CDATA[linux how to find if apache is running]]></category>
		<category><![CDATA[monitor apache cron]]></category>
		<category><![CDATA[monitor if apache is running linux]]></category>
		<category><![CDATA[monitoring service]]></category>
		<category><![CDATA[notification options]]></category>
		<category><![CDATA[restart apache cronjob]]></category>
		<category><![CDATA[script to start apache if not running]]></category>
		<category><![CDATA[server apache]]></category>
		<category><![CDATA[server load]]></category>
		<category><![CDATA[server outages]]></category>
		<category><![CDATA[shell script apache monitoring]]></category>
		<category><![CDATA[shell script apache up]]></category>
		<category><![CDATA[test if apache is running]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=169</guid>
		<description><![CDATA[I do often monitor server apache status as most often reason of server outages is Apache overload. Some web hosting panels are sending notifications when your server is down; some web services like Alertra.com provide you with different notification options and one of my hosters has his internal monitoring service. But what to do if [...]]]></description>
			<content:encoded><![CDATA[<p>I do often monitor <a href="http://www.lampdocs.com/blog/tag/server-apache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with server apache">server apache</a> status as most often reason of <a href="http://www.lampdocs.com/blog/tag/server-outages/" class="st_tag internal_tag" rel="tag" title="Posts tagged with server outages">server outages</a> is Apache overload. Some web hosting panels are sending notifications when your server is down; some web services like <a href="http://alertra.com">Alertra.com</a> provide you with different <a href="http://www.lampdocs.com/blog/tag/notification-options/" class="st_tag internal_tag" rel="tag" title="Posts tagged with notification options">notification options</a> and one of my hosters has his internal <a href="http://www.lampdocs.com/blog/tag/monitoring-service/" class="st_tag internal_tag" rel="tag" title="Posts tagged with monitoring service">monitoring service</a>. But what to do if you need to go anywhere where you can&#8217;t get access to your server? You&#8217;ll need a cron task that will check whether apache is up and will restart it if not.</p>
<p>I&#8217;ve found a solution at a <a href="http://forumi.parajsa.com/webmaster/how-check-if-apache-running-restart-via-cron-job-29844/">forum</a>. You&#8217;ll need a simple shell script and here it is:</p>
<blockquote><p>#!/bin/sh<br />
run=`ps ax | grep /usr/sbin/httpd | grep -v grep | cut -c1-5 | paste -s -`<br />
if [ "$run" ];<br />
then<br />
echo &#8220;Apache is running&#8221;<br />
else<br />
/etc/init.d/httpd start<br />
fi</p></blockquote>
<p>This script will check for a number of running script processes and will try to start apache if it is not running. You should add this script to crontab with any frequency you like. I&#8217;d suggest to run it every 3 minutes as it doesn&#8217;t cause <a href="http://www.lampdocs.com/blog/tag/server-load/" class="st_tag internal_tag" rel="tag" title="Posts tagged with server load">server load</a>, but your apache stability is vital.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/09/how-to-check-if-apache-is-up-and-restart-if-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regular Expression to Parse Text Between Simple Tags (XML)</title>
		<link>http://www.lampdocs.com/blog/2008/09/regular-expression-to-parse-text-between-simple-tags-xml/</link>
		<comments>http://www.lampdocs.com/blog/2008/09/regular-expression-to-parse-text-between-simple-tags-xml/#comments</comments>
		<pubDate>Sat, 06 Sep 2008 09:02:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache Performance]]></category>
		<category><![CDATA[PHP Solutions]]></category>
		<category><![CDATA[Regexps]]></category>
		<category><![CDATA[how to parse xml php]]></category>
		<category><![CDATA[parse text between xml tags]]></category>
		<category><![CDATA[parse text within tags]]></category>
		<category><![CDATA[parse text xml php]]></category>
		<category><![CDATA[regular expression between html tag]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=162</guid>
		<description><![CDATA[It is often necessary to extract text from a variable that contains HTML or XML code. I&#8217;ve created a simple regular expression that will help you to extract all text between certain tags into an array. It is a PHP solution, though regular expression is compatible with other programming languages. preg_match_all(&#8220;/&#60;tag&#62;(.*?)&#60;\/tag&#62;/&#8221;, $source, $results); This construsion [...]]]></description>
			<content:encoded><![CDATA[<p>It is often necessary to extract text from a variable that contains HTML or XML code. I&#8217;ve created a simple regular expression that will help you to extract all text between certain tags into an array. It is a PHP solution, though regular expression is compatible with other programming languages.</p>
<p><strong>preg_match_all(&#8220;/&lt;tag&gt;(.*?)&lt;\/tag&gt;/&#8221;, $source, $results)</strong>;</p>
<p>This construsion will create an array with extracted data. All you need is to change &#8220;tag&#8221; to any tag you like. This string was created to parse xml files, but it will work for simple HTML tags without attributes too.</p>
<p>The function above will extract all occurences of regular expression match. $output will contain an array with the extracted values. Please, run var_dump to check what&#8217;s in this array</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/09/regular-expression-to-parse-text-between-simple-tags-xml/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Optimize Your LAMP Configuration</title>
		<link>http://www.lampdocs.com/blog/2008/09/how-to-optimize-your-lamp-configuration/</link>
		<comments>http://www.lampdocs.com/blog/2008/09/how-to-optimize-your-lamp-configuration/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 07:49:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache Performance]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[MySQL Tricks]]></category>
		<category><![CDATA[PHP Configuration]]></category>
		<category><![CDATA[fine tune apache]]></category>
		<category><![CDATA[LAMP config]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=155</guid>
		<description><![CDATA[Today I&#8217;m just sharing a link: I don&#8217;t think I can explain this better than IBM guys did. These three acrticles contain a comprehensive guide for your LAMP system optimization. Here is the first one, that contains general linux settings for perfect LAMP config. The second one describes how to fine tune Apache and PHP [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;m just sharing a link: I don&#8217;t think I can explain this better than IBM guys did. These three acrticles contain a comprehensive guide for your LAMP system optimization. Here is the first one, that contains <a href="http://www.ibm.com/developerworks/linux/library/l-tune-lamp-1/index.html?S_TACT=105AGX03&amp;S_CMP=EDU">general linux settings for perfect LAMP config</a>. The second one describes <a href="http://www.ibm.com/developerworks/linux/library/l-tune-lamp-2.html?S_TACT=105AGX03&amp;S_CMP=EDU">how to fine tune Apache and PHP </a>and finally the third one deals with MySQL &#8211; you will find out <a href="http://www.ibm.com/developerworks/linux/library/l-tune-lamp-3.html?S_TACT=105AGX03&amp;S_CMP=EDU">how to optimize MySQL configuration for any server</a> . I usually recommend this guide for those who didn&#8217;t tune anything before &#8211; it&#8217;s clear and brings excellent results. If you have links to similar excellent tutorials, you&#8217;re welcome to share them in comments. Have a nice day!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/09/how-to-optimize-your-lamp-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Stopped Working After PHP Upgrade &#8211; How to Fix</title>
		<link>http://www.lampdocs.com/blog/2008/08/apache-stopped-working-after-php-upgrade-how-to-fix/</link>
		<comments>http://www.lampdocs.com/blog/2008/08/apache-stopped-working-after-php-upgrade-how-to-fix/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 08:55:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache Performance]]></category>
		<category><![CDATA[PHP Configuration]]></category>
		<category><![CDATA[apache does not reboot php upgrade]]></category>
		<category><![CDATA[Apache Stopped Working After PHP Upgrade]]></category>
		<category><![CDATA[php upgrade apache issues]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=148</guid>
		<description><![CDATA[If you are often working with PHP upgrades, you should do this automatically &#8211; you already know all the issues you might face. But if it&#8217;s done for the first time, it is quite hard to find your problem. I will tell you about the most common issue and about the applicable actions to fix [...]]]></description>
			<content:encoded><![CDATA[<p>If you are often working with PHP upgrades, you should do this automatically &#8211; you already know all the issues you might face. But if it&#8217;s done for the first time, it is quite hard to find your problem. I will tell you about the most common issue and about the applicable actions to fix this.</p>
<p>When you update your PHP installation via Directadmin build system or when you do this manually, new modules are added to httpd.cond, but the older ones are not deleted. This usually causes problems, as apache refuses to start after PHP upgrade, What do you need to do in order to tun apache again?</p>
<p>You need to edit your <strong>httpd.conf</strong> file (it is usually located at /etc/httpd/conf/httpd.conf). Open this file fith any editor you like and comment all strings that contain &#8220;php4&#8243;. The same directives for PHP5 are added automatically so you don&#8217;t have to worry about it. When you comment everything related to PHP4, you should save httpd.conf and try to reboot apache. If everything is OK, it should start, if not &#8211; you have to follow its logs or errors you receive at the command line window. Let me remind you that most useful way to restart apache is <strong>service httpd restart. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/08/apache-stopped-working-after-php-upgrade-how-to-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Change Owner of Files Created by Apache</title>
		<link>http://www.lampdocs.com/blog/2008/07/how-to-change-owner-of-files-created-by-apache/</link>
		<comments>http://www.lampdocs.com/blog/2008/07/how-to-change-owner-of-files-created-by-apache/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 20:08:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache Performance]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[access file created by apache]]></category>
		<category><![CDATA[apache change owner]]></category>
		<category><![CDATA[change owner apache files]]></category>
		<category><![CDATA[change owner to apache]]></category>
		<category><![CDATA[edit files created by php]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=118</guid>
		<description><![CDATA[If you manage any script that creates files on the server, you might meet the prob;em that you cannot edit files created by this script. This is especially related to PHP scripts, that, for example, create some text files in a folder. When you try to open these files via your FTP client, you will [...]]]></description>
			<content:encoded><![CDATA[<p>If you manage any script that creates files on the server, you might meet the prob;em that you cannot edit files created by this script. This is especially related to PHP scripts, that, for example, create some text files in a folder. When you try to open these files via your FTP client, you will most probably receive &#8220;Permission Denied&#8221; error when you try to save your changes.</p>
<p>When you run your PHP scripts, that are creating files, they almost in all cases are started by user Apache. This user has all the permissions on the created files. So we have Apache as an owner and Apache as the Group. That&#8217;s why we don&#8217;t have access to these files &#8211; we simply don&#8217;t own them.</p>
<p>I know two different solutions for this problem. The first one is quite intelligent &#8211; to use <a href="http://suphp.org/Home.html">suphp</a>. This is an Apache module, that allows to run php by the user that initially owns the executed file. That&#8217;s a great solution as it is done for entire server and all users&#8217; scripts will be affected.</p>
<p>Another solution is not so beautiful, It&#8217;s a &#8220;patch&#8221; for scripts that are actually running. If you don&#8217;t have suphp installed or don&#8217;t want to install it for any reason, you can use root crontab to chown files created by your scripts. For example, we will recursively chown a folder where script generated files are located. Just add the following line to your root crontab:</p>
<p><strong>*/10 * * * * chown user:user /folder_to_chown</strong></p>
<p>This is not quite a good idea but I don&#8217;t know any other solutions at the moment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/07/how-to-change-owner-of-files-created-by-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Deny Directory Listing Using .htaccess</title>
		<link>http://www.lampdocs.com/blog/2008/06/how-to-deny-directory-listing-using-htaccess/</link>
		<comments>http://www.lampdocs.com/blog/2008/06/how-to-deny-directory-listing-using-htaccess/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 16:15:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache Performance]]></category>
		<category><![CDATA[htaccess Solutions]]></category>
		<category><![CDATA[.htaccess and deny directory listing]]></category>
		<category><![CDATA[deny directory listing]]></category>
		<category><![CDATA[deny directory listing apache]]></category>
		<category><![CDATA[deny file listing htaccess]]></category>
		<category><![CDATA[directory listing apache]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=84</guid>
		<description><![CDATA[Often when you&#8217;re using shared hosting, there are some problems with directory listing. Server administrators should avoid this as this represents a security hole. But what to do if you don&#8217;t have access to httpd conf and need to prevent directory listing? What to do if you have something like this: A simple string in [...]]]></description>
			<content:encoded><![CDATA[<p>Often when you&#8217;re using shared hosting, there are some problems with directory listing. Server administrators should avoid this as this represents a security hole. But what to do if you don&#8217;t have access to httpd conf and need to prevent directory listing? What to do if you have something like this:</p>
<p><a href="http://www.lampdocs.com/blog/wp-content/uploads/2008/06/directory_list.jpg"><img class="alignnone size-medium wp-image-85" title="directory listing how to deny" src="http://www.lampdocs.com/blog/wp-content/uploads/2008/06/directory_list-300x279.jpg" alt="" width="300" height="279" /></a></p>
<p>A simple string in .htaccess file will save you. Here it is:</p>
<p><strong>IndexIgnore *</strong></p>
<p>In some cases the following string will also work:</p>
<p><strong>Options -Indexes</strong></p>
<p>One of these two solutions will lead you to showing 403 error to the user that tries to look what files are located in your directory. But let me repeat &#8211; this is a security hole and you should notify your system administrator about this issue. This is an emergency solution&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/06/how-to-deny-directory-listing-using-htaccess/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Monitoring Number of Apache Requests with PHP</title>
		<link>http://www.lampdocs.com/blog/2008/06/monitoring-number-of-apache-requests-with-php/</link>
		<comments>http://www.lampdocs.com/blog/2008/06/monitoring-number-of-apache-requests-with-php/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 08:24:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache Performance]]></category>
		<category><![CDATA[PHP Solutions]]></category>
		<category><![CDATA[apache load status with php]]></category>
		<category><![CDATA[check running apache processes with PHP]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=72</guid>
		<description><![CDATA[Today I&#8217;ll come with a small piece of code that will allow you to monitor the number af requests to Apache that are processed at the moment. This might help you to prevent server overload as you will always know what&#8217;s happening to your Apache. We&#8217;ll parse server-status page and will take the number of [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ll come with a small piece of code that will allow you to monitor the number af requests to Apache that are processed at the moment. This might help you to prevent server overload as you will always know what&#8217;s happening to your Apache. We&#8217;ll parse server-status page and will take the number of requests. Simple and fast&lt; as usual.</p>
<blockquote><p>&lt;?</p>
<p>// Getting the page with server status</p>
<p>$sekas=file_get_contents(&#8220;http://localhost/server-status&#8221;);<br />
// Locating the position of the number of requests displayed</p>
<p>$pos=strpos($sekas, &#8220;requests currently being processed&#8221;)-5;<br />
// Creating regexp pattern for replacement<br />
$pattern=&#8221;[^0-9]&#8220;;<br />
// Replacing non-numeric symbols<br />
$traseu=ereg_replace($pattern, &#8220;&#8221;, substr($sekas, $pos, 5));<br />
echo $traseu;<br />
?&gt;</p></blockquote>
<p>Hope this code will help you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/06/monitoring-number-of-apache-requests-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Disable Web Access to Account With IP and Username in Directadmin</title>
		<link>http://www.lampdocs.com/blog/2008/05/how-to-disable-web-access-to-account-with-ip-and-username-in-directadmin/</link>
		<comments>http://www.lampdocs.com/blog/2008/05/how-to-disable-web-access-to-account-with-ip-and-username-in-directadmin/#comments</comments>
		<pubDate>Tue, 13 May 2008 04:08:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache Performance]]></category>
		<category><![CDATA[Directadmin Tricks]]></category>
		<category><![CDATA[disable web access before domain resolution]]></category>
		<category><![CDATA[ip and password access directadmin]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=61</guid>
		<description><![CDATA[Sometimes it is necessary to disable http://ip/~username account access for any reason. Site can be unavailable or simply you don&#8217;t want users to access it in such a way. There is a simple directive in httpd.conf that will stop it. Just find the following lines and make them the same as below: &#60;IfModule mod_userdir.c&#62; #UserDir [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it is necessary to disable <a href="http://ip/%7Eusername" target="_blank">http://ip/~username</a> account access for any reason. Site can be unavailable or simply you don&#8217;t want users to access it in such a way. There is a simple directive in httpd.conf that will stop it. Just find the following lines and make them the same as below:</p>
<blockquote><p><code style="white-space: nowrap;"><code><span style="color: #000000;"><span style="color: #007700;">&lt;</span><span style="color: #0000bb;">IfModule mod_userdir</span><span style="color: #007700;">.</span><span style="color: #0000bb;">c</span><span style="color: #007700;">&gt;<br />
</span><span style="color: #ff8000;">#UserDir public_html<br />
</span><span style="color: #0000bb;">UserDir disabled<br />
</span><span style="color: #007700;">&lt;/</span><span style="color: #0000bb;">IfModule</span><span style="color: #007700;">&gt; </span></span></code></code></p></blockquote>
<p>Mod_userdir is active by default so you should pay attention to it if you don&#8217;t really want your site to be displayed with IP and username</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/05/how-to-disable-web-access-to-account-with-ip-and-username-in-directadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

