<?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>Servers and Unix World</title>
	<atom:link href="http://www.expertslogin.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.expertslogin.com</link>
	<description>Linux/Solaris/Unix Technical Knowledge Base</description>
	<lastBuildDate>Tue, 31 Jan 2012 22:18:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>How To Add New Modules In Apache</title>
		<link>http://www.expertslogin.com/linux-administration/add-modules-apache/</link>
		<comments>http://www.expertslogin.com/linux-administration/add-modules-apache/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 22:14:34 +0000</pubDate>
		<dc:creator>ZACH</dc:creator>
				<category><![CDATA[Linux Administration]]></category>
		<category><![CDATA[add apache module]]></category>
		<category><![CDATA[apache module]]></category>
		<category><![CDATA[apache2 add module]]></category>

		<guid isPermaLink="false">http://www.expertslogin.com/?p=1136</guid>
		<description><![CDATA[A module provides variety of features for apache such as security, perl and php support etc. To configure apache for additional modules you need to add LoadModule directive in httpd.conf or modules.conf file. For example you can add session management and tracking through consistent identifiers using mod_session. You need to add following entry to Apache [...]]]></description>
			<content:encoded><![CDATA[<p>A module provides variety of features for apache such as security, perl and php support etc. To configure apache for additional modules you need to add LoadModule directive in httpd.conf or modules.conf file. For example you can add session management and tracking through consistent identifiers using mod_session. You need to add following entry to Apache 1.3.xx server (under Debian Linux you need to add to /etc/apache-perl/modules.conf file):</p>
<p>LoadModule auth_module /usr/lib/apache/1.3/mod_session.so</p>
<p>Please note that your Apache server must configure for Dynamic Shared Objects (DSOs). Let us assume you have downloaded the module called mymodule.c and you would like to compile and use this module, then you can use Apache apxs utility to compile and install this module:</p>
<p>Build and install a third-party Apache module, say mod_foo.c, into its own DSO mod_foo.so outside of the Apache source tree using apxs:</p>
<p># apxs -c mymodule.c<br />
# apxs -i -a -n mymodule mymodule.la</p>
<p>Then open your httpd.conf file and add mymodule using top LoadModule Directive:</p>
<p># vi  httpd.conf</p>
<p>Append following line to server config context (this means that the directive may be used in the server configuration files (e.g., httpd.conf), but not within any or containers. It is not allowed in .htaccess files at all).</p>
<p>LoadModule mymodule /usr/lib/httpd/modules/mymodule.so</p>
]]></content:encoded>
			<wfw:commentRss>http://www.expertslogin.com/linux-administration/add-modules-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speed Webpages Using Mod_Deflate Module On Apache</title>
		<link>http://www.expertslogin.com/linux-administration/speed-webpages-moddeflate-module-apache/</link>
		<comments>http://www.expertslogin.com/linux-administration/speed-webpages-moddeflate-module-apache/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 10:05:21 +0000</pubDate>
		<dc:creator>ZACH</dc:creator>
				<category><![CDATA[Linux Administration]]></category>
		<category><![CDATA[mod_deflate]]></category>

		<guid isPermaLink="false">http://www.expertslogin.com/?p=1132</guid>
		<description><![CDATA[Mod_deflate module is used with Apache to increase the speed of download. This module can be used with Apache and it will compress the data before sending to the client. It now been installed by default with most flavours. So you can check before you try to install it. Note: Processing takes additional CPU and [...]]]></description>
			<content:encoded><![CDATA[<p>Mod_deflate module is used with Apache to increase the speed of download. This module can be used with Apache and it will compress the data before sending to the client. It now been installed by default with most flavours. So you can check before you try to install it. Note: Processing takes additional CPU and memory on your server as well as on the client browser. </p>
<p>Below example show how to enable mod_deflate module.</p>
<p>LoadModule deflate_module modules/mod_deflate.so</p>
<p>Append following configuration <Location /> directive:<br />
<Location /><br />
AddOutputFilterByType DEFLATE text/html text/plain text/xml<br />
&#8230;.<br />
&#8230;<br />
<Location></p>
<p>Above line only compress html and xml files. Here is the configuration from one of my production box:<br />
<Location /><br />
&#8230;<br />
&#8230;<br />
AddOutputFilterByType DEFLATE text/plain<br />
AddOutputFilterByType DEFLATE text/xml<br />
AddOutputFilterByType DEFLATE application/xhtml+xml<br />
AddOutputFilterByType DEFLATE text/css<br />
AddOutputFilterByType DEFLATE application/xml<br />
AddOutputFilterByType DEFLATE image/svg+xml<br />
AddOutputFilterByType DEFLATE application/rss+xml<br />
AddOutputFilterByType DEFLATE application/atom_xml<br />
AddOutputFilterByType DEFLATE application/x-javascript<br />
AddOutputFilterByType DEFLATE application/x-httpd-php<br />
AddOutputFilterByType DEFLATE application/x-httpd-fastphp<br />
AddOutputFilterByType DEFLATE application/x-httpd-eruby<br />
AddOutputFilterByType DEFLATE text/html<br />
&#8230;<br />
&#8230;<br />
<Location></p>
<p>Close and save the file. Next restart apache web server. All of the above extension file should compressed by mod_deflate:<br />
# /etc/init.d/httpd restart</p>
<p>You can also specify specific directory and enabling compression only for the html files. For example /static/help/ directory:<br />
<Directory "/static/help"><br />
AddOutputFilterByType DEFLATE text/html<br />
</Directory></p>
<p>In real life, there are issues with compressing other types of files such as mp3 or images. If you don’t want to compress images or mp3 files, add following to your configuration:<br />
SetOutputFilter DEFLATE<br />
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.avi$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.mov$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.mp4$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.rm$ no-gzip dont-vary</p>
]]></content:encoded>
			<wfw:commentRss>http://www.expertslogin.com/linux-administration/speed-webpages-moddeflate-module-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Disable Apache Directory Listing</title>
		<link>http://www.expertslogin.com/linux-administration/disable-apache-directory-listing/</link>
		<comments>http://www.expertslogin.com/linux-administration/disable-apache-directory-listing/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 16:19:58 +0000</pubDate>
		<dc:creator>ZACH</dc:creator>
				<category><![CDATA[Linux Administration]]></category>
		<category><![CDATA[apache directory listing]]></category>
		<category><![CDATA[disable directory listing]]></category>

		<guid isPermaLink="false">http://www.expertslogin.com/?p=1128</guid>
		<description><![CDATA[In your httpd.conf file you should have something like this: Options Indexes FollowSymLinks bla bla bla To disable directory listing for that directory REMOVE the &#8216;Indexes&#8217; option. Also, you can use &#8216;-Indexes&#8217; for that and, sure, you can make a new entry for a specific directory OR One of the &#8220;must do&#8217;s&#8221; on setting a [...]]]></description>
			<content:encoded><![CDATA[<p>In your httpd.conf file you should have something like this:</p>
<p><Directory  /som/directory/name><br />
Options Indexes FollowSymLinks<br />
bla bla bla<br />
</Directory></p>
<p>To disable directory listing for that directory REMOVE the &#8216;Indexes&#8217;<br />
option. Also, you can use &#8216;-Indexes&#8217; for that and, sure, you can make a<br />
new entry for a specific directory</p>
<p>OR </p>
<p>One of the &#8220;must do&#8217;s&#8221; on setting a secure apache webserver environment is to disable directory browsing. As a default Apache will be compiled with this option enabled, but its always a good idea to get rid of this setting unless its really necessary. If you have some basic knowledge of vi editor follow this steps</p>
<p>If you are on an RPM installation of Apache (which i dont really recommend) you will find the apache configuration file probably here:</p>
<p>/etc/httpd/conf/httpd.conf</p>
<p>If you are using apache from the source tar balls ( like real men ) probably you will find the configuration file here:</p>
<p>/usr/local/apache/conf/httpd.conf</p>
<p>Using an editor like vi , edit the httpd.conf file and scroll until you find a line like this:</p>
<p>  Options All Indexes FollowSymLinks MultiViews</p>
<p>To disable directory browsing carefully remove the line that says: Indexes and leave the line like this:</p>
<p>  Options All FollowSymLinks MultiViews</p>
<p>Restart your apache webserver and thats all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.expertslogin.com/linux-administration/disable-apache-directory-listing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sample Apache Virtual Host Entry</title>
		<link>http://www.expertslogin.com/linux-administration/sample-apache-virtual-host-entry/</link>
		<comments>http://www.expertslogin.com/linux-administration/sample-apache-virtual-host-entry/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 15:24:15 +0000</pubDate>
		<dc:creator>ZACH</dc:creator>
				<category><![CDATA[Linux Administration]]></category>
		<category><![CDATA[apache virtual host]]></category>

		<guid isPermaLink="false">http://www.expertslogin.com/?p=1125</guid>
		<description><![CDATA[A sample Apache Virtual Host Entry for your reference. vi /etc/httpd/conf/httpd.conf &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; NameVirtualHost 67.159.54.145:80 NameVirtualHost 67.159.54.146:80 ServerName sample.com ServerAlias www.sample.com DocumentRoot /home/sample/public_html ServerName techside.com ServerAlias www.techside.com DocumentRoot /home/techside/public_html ============================================================= hash all lines in this file other wise default page will display /etc/httpd/conf.d/welcome.conf # # This configuration file enables the default &#8220;Welcome&#8221; # page [...]]]></description>
			<content:encoded><![CDATA[<p>A sample Apache Virtual Host Entry for your reference.</p>
<p>vi /etc/httpd/conf/httpd.conf</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
NameVirtualHost 67.159.54.145:80<br />
NameVirtualHost 67.159.54.146:80</p>
<p><VirtualHost 67.159.54.145:80><br />
ServerName sample.com<br />
ServerAlias www.sample.com<br />
DocumentRoot /home/sample/public_html<br />
</VirtualHost></p>
<p><VirtualHost 67.159.54.146:80><br />
ServerName techside.com<br />
ServerAlias www.techside.com<br />
DocumentRoot /home/techside/public_html<br />
</VirtualHost></p>
<p>=============================================================<br />
hash all lines in this file other wise default page will display</p>
<p>/etc/httpd/conf.d/welcome.conf</p>
<p>#<br />
# This configuration file enables the default &#8220;Welcome&#8221;<br />
# page if there is no default index page present for<br />
# the root URL.  To disable the Welcome page, comment<br />
# out all the lines below.<br />
#<br />
#<LocationMatch "^/+$"><br />
#    Options -Indexes<br />
#    ErrorDocument 403 /error/noindex.html<br />
#</LocationMatch></p>
]]></content:encoded>
			<wfw:commentRss>http://www.expertslogin.com/linux-administration/sample-apache-virtual-host-entry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Delete Apache Semaphore</title>
		<link>http://www.expertslogin.com/general/how-to-delete-apache-semaphore/</link>
		<comments>http://www.expertslogin.com/general/how-to-delete-apache-semaphore/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 10:06:05 +0000</pubDate>
		<dc:creator>ZACH</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[apache performance]]></category>
		<category><![CDATA[apache semaphore]]></category>

		<guid isPermaLink="false">http://www.expertslogin.com/?p=1119</guid>
		<description><![CDATA[Apache generates semaphores and when it can not generate more, you should get an error like this: &#8220;No space left on device:mod_rewrite: could not create_rewrite: could not create rewrite_log_lockConfiguration Failed&#8221; You should delete semaphores to fix it. Listing and deleting semaphores : # ipcs -s grep apache # ipcs -s grep apache perl -e &#8216;while [...]]]></description>
			<content:encoded><![CDATA[<p>Apache generates semaphores and when it can not generate more, you should get an error like this:</p>
<p>&#8220;No space left on device:mod_rewrite: could not create_rewrite: could not create rewrite_log_lockConfiguration Failed&#8221;</p>
<p>You should delete semaphores to fix it.</p>
<p>Listing and deleting semaphores :</p>
<p># ipcs -s grep apache<br />
# ipcs -s grep apache perl -e &#8216;while () { @a=split(/\s+/); print `ipcrm sem $a[1]`}&#8217;</p>
<p>You should be able to start apache fine now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.expertslogin.com/general/how-to-delete-apache-semaphore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic authentication of HTTP users using htpasswd command</title>
		<link>http://www.expertslogin.com/linux-administration/basic-authentication-http-users-htpasswd-command/</link>
		<comments>http://www.expertslogin.com/linux-administration/basic-authentication-http-users-htpasswd-command/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 10:29:22 +0000</pubDate>
		<dc:creator>jomos</dc:creator>
				<category><![CDATA[Linux Administration]]></category>
		<category><![CDATA[apache htpasswd]]></category>
		<category><![CDATA[htpasswd generate]]></category>

		<guid isPermaLink="false">http://www.expertslogin.com/?p=1113</guid>
		<description><![CDATA[htpasswd is used to create and update the flat-files used to store usernames and password for basic authentication of HTTP users. If htpasswd cannot access a file, such as not being able to write to the output file or not being able to read the file in order to update it, it returns an error [...]]]></description>
			<content:encoded><![CDATA[<p>htpasswd is used to create and update the flat-files used to store usernames and password for basic authentication of HTTP users. If htpasswd cannot access a file, such as not being able to write to the output file or not being able to read the file in order to update it, it returns an error status and makes no changes.</p>
<p>Create a new password file</p>
<p>Following command will creates a new file and stores a record in it for user jerry. The user is prompted for the password. If the file exists and cannot be read, or cannot be written, it is not altered and htpasswd will display a message and return an error status.</p>
<p># htpasswd -c /home/pwww/.htpasswd user</p>
<p>Change or update password</p>
<p>To add or modifies the password for user tom, enter:</p>
<p># htpasswd /home/pwww/.htpasswd-users tom</p>
<p>The user is prompted for the password.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.expertslogin.com/linux-administration/basic-authentication-http-users-htpasswd-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cannot restart Apache : Segmentation fault : Apache Down</title>
		<link>http://www.expertslogin.com/linux-administration/cannot-restart-apache-segmentation-fault-apache-down/</link>
		<comments>http://www.expertslogin.com/linux-administration/cannot-restart-apache-segmentation-fault-apache-down/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 09:14:39 +0000</pubDate>
		<dc:creator>ZACH</dc:creator>
				<category><![CDATA[Linux Administration]]></category>
		<category><![CDATA[apache segmentation fault]]></category>
		<category><![CDATA[cannot restart apache]]></category>

		<guid isPermaLink="false">http://www.expertslogin.com/?p=1109</guid>
		<description><![CDATA[Apache goes down and wont come up if we try to start/restart. Here is how the error looks like: &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; /etc/init.d/httpd restart: httpd not running, trying to start [Tue May 6 01:31:31 2008] [warn] module bwlimited_module is already loaded, skipping [Tue May 6 01:31:31 2008] [warn] module php5_module is already loaded, skipping /etc/init.d/httpd: line 83: [...]]]></description>
			<content:encoded><![CDATA[<p>Apache goes down and wont come up if we try to start/restart. Here is how the error looks like:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
/etc/init.d/httpd restart: httpd not running, trying to start<br />
[Tue May 6 01:31:31 2008] [warn] module bwlimited_module is already loaded, skipping<br />
[Tue May 6 01:31:31 2008] [warn] module php5_module is already loaded, skipping<br />
/etc/init.d/httpd: line 83: 1044 Segmentation fault (core dumped) $HTTPD<br />
/etc/init.d/httpd restart: httpd could not be started</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>One of the reasons why this could happen is the use of Resin modules along with apache. Resin modules act as a fast servlet runner for apache. It acts as a separate layer that speeds up Java servlet handling. Normally, apache doesen&#8217;t support JSP pages, Resin modules serves this function too.</p>
<p>Once you come across such an error, follow the steps below to bring apache back online.</p>
<p>1) cd /usr/local/apache/logs</p>
<p>2) Remove the following:</p>
<p>rm -rf ssl*<br />
rm -rf core.*<br />
rm sess*</p>
<p>3) Try to restart apache using apachectl and and /etc/init.d/httpd. Examine the core dump file and see if you can find out<br />
which module is causing the module.</p>
<p>4) If you cannot find out which particular module is causing the issue, find out the php modules that are compiled into<br />
apache using php -m.</p>
<p>5) php -m will list out the modules. You can search for each module in the httpd.conf file. Comment out each module and then try restarting apache . (use /etc/init.d/httpd startssl)Obviously, this is a trial and error method and can consume a little more time. But it is effective. By this way, we can find out which module is causing the trouble.</p>
<p>For example, lets say the Resin module is causing the problem. Then search for &#8220;resin&#8221; in httpd.conf. You should find something like<br />
&#8220;ResinConfigServer 127.0.0.1 6802&#8243; comment out the line and restart apache using /etc/init.d/httpd startssl. This should fix the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.expertslogin.com/linux-administration/cannot-restart-apache-segmentation-fault-apache-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache (httpd.conf) Directives A Quick Look</title>
		<link>http://www.expertslogin.com/general/apache-httpdconf-directives-quick/</link>
		<comments>http://www.expertslogin.com/general/apache-httpdconf-directives-quick/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 11:04:40 +0000</pubDate>
		<dc:creator>jomos</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[apache directives]]></category>
		<category><![CDATA[apache directory directive]]></category>

		<guid isPermaLink="false">http://www.expertslogin.com/?p=1104</guid>
		<description><![CDATA[ServerType standalone The option ServerType specifies how Apache should run on the system. You can run it from the super-server inetd, or as standalone daemon. It&#8217;s highly recommended to run Apache in standalone type for better performance and speed. ServerRoot &#8220;/etc/httpd&#8221; The option ServerRoot specifies the directory in which the configuration files of the Apache [...]]]></description>
			<content:encoded><![CDATA[<p>ServerType standalone</p>
<p>The option ServerType specifies how Apache should run on the system. You can run it from the super-server inetd, or as standalone daemon. It&#8217;s highly recommended to run Apache in standalone type for better performance and speed. </p>
<p>ServerRoot &#8220;/etc/httpd&#8221;</p>
<p>The option ServerRoot specifies the directory in which the configuration files of the Apache server lives. It allows Apache to know where it can find its configuration files when it starts. </p>
<p>PidFile /var/run/httpd.pid</p>
<p>The option PidFile specifies the location where the server will record the process id of the daemon when it starts. This option is only required when you configure Apache in standalone mode. </p>
<p>ResourceConfig /dev/null</p>
<p>The option ResourceConfig specifies the location of the old srm.conf file that Apache read after it finished reading the httpd.conf file. When you set the location to /dev/null, Apache allows you to include the content of this file in httpd.conf file, and in this manner, you have just one file that handles all your configuration parameters for simplicity. </p>
<p>AccessConfig /dev/null</p>
<p>The option AccessConfig specifies the location of the old access.conf file that Apache read after it finished reading the srm.conf file. When you set the location to /dev/null, Apache allows you to include the content of this file in httpd.conf file, and in this manner, you have just one file that handles all your configuration parameters for simplicity. </p>
<p>Timeout 300</p>
<p>The option Timeout specifies the amount of time Apache will wait for a GET, POST, PUT request and ACKs on transmissions. You can safely leave this option on its default values. </p>
<p>KeepAlive On</p>
<p>The option KeepAlive, if set to On, specifies enabling persistent connections on this web server. For better performance, it&#8217;s recommended to set this option to On, and allow more than one request per connection. </p>
<p>MaxKeepAliveRequests 0</p>
<p>The option MaxKeepAliveRequests specifies the number of requests allowed per connection when the KeepAlive option above is set to On. When the value of this option is set to 0 then unlimited requests are allowed on the server. For server performance, it&#8217;s recommended to allow unlimited requests. </p>
<p>KeepAliveTimeout 15</p>
<p>The option KeepAliveTimeout specifies how much time, in seconds, Apache will wait for a subsequent request before closing the connection. The value of 15 seconds is a good average for server performance. </p>
<p>MinSpareServers 16</p>
<p>The option MinSpareServers specifies the minimum number of idle child server processes for Apache, which is not handling a request. This is an important tuning parameter regarding the performance of the Apache web server. For high load operation, a value of 16 is recommended by various benchmarks on the Internet. </p>
<p>MaxSpareServers 64</p>
<p>The option MaxSpareServers specifies the maximum number of idle child server processes for Apache, which is not handling a request. This is also an important tuning parameter regarding the performance of the Apache web server. For high load operation, a value of 64 is recommended by various benchmarks on the Internet. </p>
<p>StartServers 16</p>
<p>The option StartServers specifies the number of child server processes that will be created by Apache on start-up. This is, again, an important tuning parameter regarding the performance of the Apache web server. For high load operation, a value of 16 is recommended by various benchmarks on the Internet. </p>
<p>MaxClients 512</p>
<p>The option MaxClients specifies the number of simultaneous requests that can be supported by Apache. This too is an important tuning parameter regarding the performance of the Apache web server. For high load operation, a value of 512 is recommended by various benchmarks on the Internet.</p>
<p>MaxRequestsPerChild 100000</p>
<p>The option MaxRequestsPerChild specifies the number of requests that an individual child server process will handle. This too is an important tuning parameter regarding the performance of the Apache web server. </p>
<p>User www</p>
<p>The option User specifies the UID that Apache server will run as. It&#8217;s important to create a new user that has minimal access to the system, and functions just for the purpose of running the web server daemon. </p>
<p>Group www</p>
<p>The option Group specifies the GID the Apache server will run as. It&#8217;s important to create a new group that has minimal access to the system and functions just for the purpose of running the web server daemon. </p>
<p>DirectoryIndex index.htm index.html index.php index.php3 default.html index.cgi</p>
<p>The option DirectoryIndex specifies the files to use by Apache as a pre-written HTML directory index. In other words, if Apache can&#8217;t find the default index page to display, it&#8217;ll try the next entry in this parameter, if available. To improve performance of your web server it&#8217;s recommended to list the most used default index pages of your web site first. </p>
<p>Include conf/mmap.conf</p>
<p>The option Include specifies the location of other files that you can include from within the server configuration files httpd.conf. In our case, we include the mmap.conf file located under /etc/httpd/conf directory. This file mmap.conf maps files into memory for faster serving. See the section on Optimizing Apache for more information. </p>
<p>HostnameLookups Off</p>
<p>The option HostnameLookups, if set to Off, specifies the disabling of DNS lookups. It&#8217;s recommended to set this option to Off in order to save the network traffic time, and to improve the performance of your Apache web server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.expertslogin.com/general/apache-httpdconf-directives-quick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy MRTG Installation on CentOS 5</title>
		<link>http://www.expertslogin.com/general/easy-mrtg-installation-centos-5/</link>
		<comments>http://www.expertslogin.com/general/easy-mrtg-installation-centos-5/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 12:54:42 +0000</pubDate>
		<dc:creator>ZACH</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[mrtg installation]]></category>

		<guid isPermaLink="false">http://www.expertslogin.com/?p=1097</guid>
		<description><![CDATA[Below steps shows how to install MRTG on CentOS 5. First install SNMP with yum or with rpms Essential rpms need are given below net-snmp-5.3.1-14.el5.i386.rpm net-snmp-devel-5.3.1-14.el5.i386.rpm net-snmp-libs-5.3.1-14.el5.i386.rpm net-snmp-perl-5.3.1-14.el5.i386.rpm net-snmp-utils-5.3.1-14.el5.i386.rpm perl-IO-Socket-INET6-2.51-2.fc6.noarch.rpm perl-Socket6-0.19-3.fc6.i386.rpm ============================================================= 1. Introduction MRTG (Multi Router Traffic Grapher) is an application that allows us to observe the traffic of a network. It generates html [...]]]></description>
			<content:encoded><![CDATA[<p>Below steps shows how to install MRTG on CentOS 5.</p>
<p>First install SNMP with yum or with rpms</p>
<p>Essential rpms need are given below</p>
<p>net-snmp-5.3.1-14.el5.i386.rpm<br />
net-snmp-devel-5.3.1-14.el5.i386.rpm<br />
net-snmp-libs-5.3.1-14.el5.i386.rpm<br />
net-snmp-perl-5.3.1-14.el5.i386.rpm<br />
net-snmp-utils-5.3.1-14.el5.i386.rpm<br />
perl-IO-Socket-INET6-2.51-2.fc6.noarch.rpm<br />
perl-Socket6-0.19-3.fc6.i386.rpm</p>
<p>=============================================================</p>
<p>1. Introduction<br />
MRTG (Multi Router Traffic Grapher) is an application that allows us to observe the traffic of a network. It generates html pages with graphs which are refreshed according to our network’s current state. Its source is written in Perl and C which means that it can be installed in every Operating System we like. We will also need SNMP daemon (Simple Network Management Protocol) which gives us information for a network. The following installation was accomplished under Linux and specifically Fedora Core 6. With some little changes it can be used and under other distros.</p>
<p>2. SNMP server</p>
<p>2.1 Installation</p>
<p>Initially we install the packets needed for SNMP. Yum makes this job a lot easier.</p>
<p>Next we make snmpd service to start automatically for the runlevels we want.<br />
# yum install net-snmp-utils net-snmp</p>
<p>And we start the server.<br />
# chkconfig &#8211;level 345 snmpd</p>
<p>We can see that it is running in port 199.<br />
# service snmpd start</p>
<p># netstat -natv | grep &#8216;:199&#8242;</p>
<p>tcp        0      0 127.0.0.1:199               0.0.0.0:*                   LISTEN</p>
<p>2.2  Configuration</p>
<p>We run ‘snmpwalk’ which creates a “tree” of information for our network.</p>
<p>If you see an output like this one you may proceed with the MRTG installation. Else you should make some configuration first.<br />
# snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex </p>
<p>ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.127.0.0.1 = 1</p>
<p>ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.168.0.3 = 2</p>
<p>We keep a backup of snmpd.conf just in case anything goes wrong</p>
<p># cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.original</p>
<p>We open it</p>
<p># nano /etc/snmp/snmpd.conf</p>
<p>And do the follow changes:</p>
<p>    * we change this line</p>
<p>com2sec notConfigUser  default       public</p>
<p>with those</p>
<p>com2sec local          localhost        public</p>
<p>com2sec mynetwork 10.0.0.0/8      public</p>
<p>where 10.0.0.0/8 we put what our network is</p>
<p>    * we change those lines</p>
<p>group   notConfigGroup v1           notConfigUser</p>
<p>group   notConfigGroup v2c          notConfigUser</p>
<p>with those</p>
<p>group   MyRWGroup      v1          local</p>
<p>group   MyRWGroup      v2c         local</p>
<p>group   MyRWGroup      usm       local</p>
<p>group   MyROGroup      v1          mynetwork</p>
<p>group   MyROGroup      v2c         mynetwork</p>
<p>group   MyROGroup      usm       mynetwork</p>
<p>    * we change those lines</p>
<p>view    systemview    included   .1.3.6.1.2.1.1</p>
<p>view    systemview    included   .1.3.6.1.2.1.25.1.1</p>
<p>with this one</p>
<p>view    all            included      .1              80</p>
<p>    * we change this line</p>
<p>access  notConfigGroup &#8220;&#8221;      any       noauth    exact  systemview none none   </p>
<p>with those</p>
<p>access MyROGroup &#8220;&#8221;      any       noauth    exact  all    none   none</p>
<p>access MyRWGroup &#8220;&#8221;      any       noauth    exact  all    all    none </p>
<p>    * and finally we change those lines</p>
<p>syslocation Unknown (edit /etc/snmp/snmpd.conf)</p>
<p>syscontact Root  (configure /etc/snmp/snmp.local.conf)</p>
<p>with something like this</p>
<p>syslocation Linux, Fedora Core 6</p>
<p>syscontact Root root@localhost </p>
<p>2.3 Check</p>
<p>We restart the server to take affect of the notices</p>
<p># service snmpd restart</p>
<p>And we run again</p>
<p># snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex</p>
<p>Now we should see something like that</p>
<p>IP-MIB::ipAdEntIfIndex.10.103.0.33 = INTEGER: 2</p>
<p>IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1</p>
<p>Where 10.103.0.33 is your ip address.</p>
<p>3. MRTG</p>
<p>3.1 Installation</p>
<p>We again use yum</p>
<p># yum install mrtg</p>
<p>3.2 Configuration</p>
<p>We create the folder in which our graphs and html pages will be kept</p>
<p># mkdir /var/www/html/mrtg/</p>
<p>And we run ‘cfgmaker’ for the configuration file to be created.</p>
<p># cfgmaker &#8211;global &#8220;workdir: /var/www/mrtg&#8221; -ifref=ip &#8211;output /etc/mrtg/mrtg.cfg &#8211;global &#8216;options[_]: growright,bits&#8217; public@localhost</p>
<p>Here you should pay notice to &#8211;output /etc/mrtg/mrtg.cfg as long as to public@localhost. With this command we tell MRTG to create a configuration file with the name ‘mrtg.cfg’ for the traffic of our computer (localhost). Instead of localhost you may put the address of any computer you may monitor as long as it runs SNMP.</p>
<p>Next we create our default index page</p>
<p># indexmaker &#8211;output=/var/www/html/mrtg/index.html /etc/mrtg/mrtg.cfg   </p>
<p>3.2.1 Apache configuration</p>
<p>Next we have to configure apache for MRTG to work correctly. MRTG creates a file ‘mrtg.cfg’ under /etc/httpd/conf.d we contains all the necessary for Apache. We change it to contain the ips we want to have access to our MRTG graphs. Here I have added all my network.</p>
<p>Alias /mrtg /var/www/mrtg</p>
<p><Location /mrtg><br />
   Order deny,allow</p>
<p>   Deny from all</p>
<p>   Allow from 127.0.0.1 10.0.0.0/8</p>
<p></Location></p>
<p>3.3 Check</p>
<p>We run the following command</p>
<p>In case you get an error like this<br />
# mrtg /etc/mrtg/mrtg.cfg </p>
<p>ERROR: Mrtg will most likely not work properly when the environment</p>
<p>      variable LANG is set to UTF-8. Please run mrtg in an environment</p>
<p>      where this is not the case. Try the following command to start:</p>
<p>       env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg</p>
<p>you have to run the above command more than once till it runs without any error. This is normal.<br />
# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg</p>
<p>23-02-2007 17:28:53, Rateup WARNING: /usr/bin/rateup Can&#8217;t remove localhost_2.old updating log file</p>
<p># env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg</p>
<p>#</p>
<p>Finally we open our browser and type</p>
<p>http://127.0.0.1/mrtg</p>
]]></content:encoded>
			<wfw:commentRss>http://www.expertslogin.com/general/easy-mrtg-installation-centos-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protecting web applications from known and unknown attacks</title>
		<link>http://www.expertslogin.com/general/protecting-web-applications-unknown-attacks/</link>
		<comments>http://www.expertslogin.com/general/protecting-web-applications-unknown-attacks/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 08:54:11 +0000</pubDate>
		<dc:creator>ZACH</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[apache mod security]]></category>
		<category><![CDATA[apache modsecurity]]></category>
		<category><![CDATA[apache mod_security]]></category>

		<guid isPermaLink="false">http://www.expertslogin.com/?p=1091</guid>
		<description><![CDATA[If you ask me what is ModSecurity below is simple explanation. ModSecurity is an open source intrusion detection and prevention engine for web applications. Operating as an Apache Web server module, the purpose of ModSecurity is to increase web application security, protecting web applications from known and unknown attacks. First we will download and unzip [...]]]></description>
			<content:encoded><![CDATA[<p>If you ask me what is ModSecurity below is simple explanation.</p>
<p>ModSecurity is an open source intrusion detection and prevention engine for web applications. Operating as an Apache Web server module, the purpose of ModSecurity is to increase web application security, protecting web applications from known and unknown attacks.</p>
<p>First we will download and unzip mod_security.</p>
<p>wget http://www.modsecurity.org/download/mod … 9.4.tar.gz<br />
tar -zxf modsecurity-apache_1.9.4.tar.gz</p>
<p>If you are using Apache 1.3.x you need to go into the apache1 directory as shown below. Cpanel and ensim both use apache 1.3.x</p>
<p>cd modsecurity-apache_1.9.4/apache1</p>
<p>If you are using Apache 2.x you need to go into the apache 2 directory as shown below. Plesk uses apache 2.x and may require the httpd-devel rpm to be installed to get mod_security working.</p>
<p>cd modsecurity_1.9.4/apache2</p>
<p>Next compile mod_security at a module. One of the lines below should work to compile it.</p>
<p>/etc/httpd/bin/apxs -cia mod_security.c</p>
<p>If you get a file not found install httpd-devel using up2date then try to compile it again. This will work fine on Plesk and the newer versions of Ensim that do not use &#8220;ensimized&#8221; httpd rpms. If you are running below Ensim 4.0 you should not continue unless you are certain of what you are doing.</p>
<p>up2date -i httpd-devel or yum install httpd-devel<br />
/usr/sbin/apxs -cia mod_security.c</p>
<p>Make a backup of your httpd.conf before touching anything so you have something to go back to if it does not work.</p>
<p>cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf-mod_sec</p>
<p>Now edit the httpd.conf , even though Ensim has multiple httpd.conf files you can put it in the primary config.</p>
<p>vi /etc/httpd/conf/httpd.conf</p>
<p>If you are running Apache 1.3.x &#8211; cPanel and Pre 4.0 Ensim<br />
Scroll down below the following line:</p>
<p>AddModule mod_security.c</p>
<p>If you do not have the addmodule line find where the rest of them are located and put it right below the others.</p>
<p>If you are running Apache 2.x (Plesk and Ensim 4.0+)<br />
Scroll down below the following line at which point you can continue on and paste the ruleset.<br />
LoadModule security_module modules/mod_security.so</p>
<p>Now you are going to paste in this ruleset. Please feel free to modify it as you see fit. I think that it is a very non-agreesive ruleset that will work fine on just about any server. Please post any problems you have with it below!</p>
<p>&#8212;-Ruleset&#8212;-<br />
<IfModule mod_security.c><br />
# Turn the filtering engine On or Off<br />
SecFilterEngine On<br />
# Change Server: string<br />
SecServerSignature &#8220;Apache&#8221;</p>
<p># This setting should be set to On only if the Web site is<br />
# using the Unicode encoding. Otherwise it may interfere with<br />
# the normal Web site operation.<br />
SecFilterCheckUnicodeEncoding Off</p>
<p># The audit engine works independently and<br />
# can be turned On of Off on the per-server or<br />
# on the per-directory basis. &#8220;On&#8221; will log everything,<br />
# &#8220;DynamicOrRelevant&#8221; will log dynamic requests or violations,<br />
# and &#8220;RelevantOnly&#8221; will only log policy violations<br />
SecAuditEngine RelevantOnly<br />
# The name of the audit log file<br />
SecAuditLog logs/audit_log<br />
# Should mod_security inspect POST payloads<br />
SecFilterScanPOST On<br />
# Action to take by default<br />
SecFilterDefaultAction &#8220;deny,log,status:403&#8243;<br />
## ## ## ## ## ## ## ## ## ##<br />
## ## ## ## ## ## ## ## ## ##<br />
# Require HTTP_USER_AGENT and HTTP_HOST in all requests<br />
# SecFilterSelective &#8220;HTTP_USER_AGENT|HTTP_HOST&#8221; &#8220;^$&#8221;<br />
# Require Content-Length to be provided with<br />
# every POST request<br />
SecFilterSelective REQUEST_METHOD &#8220;^POST$&#8221; chain<br />
SecFilterSelective HTTP_Content-Length &#8220;^$&#8221;<br />
# Don&#8217;t accept transfer encodings we know we don&#8217;t handle<br />
# (and you don&#8217;t need it anyway)<br />
SecFilterSelective HTTP_Transfer-Encoding &#8220;!^$&#8221;<br />
# Protecting from XSS attacks through the PHP session cookie<br />
SecFilterSelective ARG_PHPSESSID &#8220;!^[0-9a-z]*$&#8221;<br />
SecFilterSelective COOKIE_PHPSESSID &#8220;!^[0-9a-z]*$&#8221;<br />
SecFilter &#8220;viewtopic\.php\?&#8221; chain<br />
SecFilter &#8220;chr\(([0-9]{1,3})\)&#8221; &#8220;deny,log&#8221;<br />
# Block various methods of downloading files to a server<br />
SecFilterSelective THE_REQUEST &#8220;wget &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;lynx &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;scp &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;ftp &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;cvs &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;rcp &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;curl &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;telnet &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;ssh &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;echo &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;links -dump &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;links -dump-charset &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;links -dump-width &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;links http:// &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;links ftp:// &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;links -source &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;mkdir &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;cd /tmp &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;cd /var/tmp &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;cd /etc/httpd/proxy &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;/config.php?v=1&#038;DIR &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;&#038;highlight=%2527%252E &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;changedir=%2Ftmp%2F.php &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;arta\.zip &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;cmd=cd\x20/var &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;HCL_path=http &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;clamav-partial &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;vi\.recover &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;netenberg &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;psybnc &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;fantastico_de_luxe &#8221;</p>
<p>SecFilter &#8220;bcc:&#8221;<br />
SecFilter &#8220;bcc\x3a&#8221;<br />
SecFilter &#8220;cc:&#8221;<br />
SecFilter &#8220;cc\x3a&#8221;<br />
SecFilter &#8220;bcc:|Bcc:|BCC:&#8221; chain<br />
SecFilter &#8220;[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}\,\x20[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}&#8221;<br />
SecFilterSelective POST_PAYLOAD &#8220;Bcc:&#8221;<br />
SecFilterSelective POST_PAYLOAD &#8220;Bcc:\x20&#8243;<br />
SecFilterSelective POST_PAYLOAD &#8220;cc:&#8221;<br />
SecFilterSelective POST_PAYLOAD &#8220;cc:\x20&#8243;<br />
SecFilterSelective POST_PAYLOAD &#8220;bcc:&#8221;<br />
SecFilterSelective POST_PAYLOAD &#8220;bcc:\x20&#8243;<br />
SecFilterSelective POST_PAYLOAD &#8220;bcc: &#8221;<br />
SecFilterSelective THE_REQUEST &#8220;Bcc:&#8221;<br />
SecFilterSelective THE_REQUEST &#8220;Bcc:\x20&#8243;<br />
SecFilterSelective THE_REQUEST &#8220;cc:&#8221;<br />
SecFilterSelective THE_REQUEST &#8220;cc:\x20&#8243;<br />
SecFilterSelective THE_REQUEST &#8220;bcc:&#8221;<br />
SecFilterSelective THE_REQUEST &#8220;bcc:\x20&#8243;<br />
SecFilterSelective THE_REQUEST &#8220;bcc: &#8221;<br />
# WEB-PHP phpbb quick-reply.php arbitrary command attempt<br />
SecFilterSelective THE_REQUEST &#8220;/quick-reply\.php&#8221; chain<br />
SecFilter &#8220;phpbb_root_path=&#8221;</p>
<p></IfModule><br />
&#8212;/Ruleset&#8212;</p>
<p>Now simply restart apache to enable mod_security.</p>
<p>service httpd restart</p>
<p>If sites start to have problems look at error log.<br />
/etc/httpd/logs/audit_log<br />
If you need or want to remove mod_security at any time simply comment out (put a # in front of) the AddModule mod_security.c line and restart apache. This will disable all of the rules and not allow it to load into apache.<br />
Ok mod_security is all setup.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.expertslogin.com/general/protecting-web-applications-unknown-attacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.395 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-22 20:42:25 -->

