<?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>TechniTip.Net &#187; Apache</title> <atom:link href="http://technitip.net/tag/apache/feed" rel="self" type="application/rss+xml" /><link>http://technitip.net</link> <description>TechniTip.Net - Useful tips regarding technical stuff for things like Linux, MySQL, Apache, PHP, Linux Server, iPhone and more.</description> <lastBuildDate>Fri, 03 Feb 2012 18:31:08 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <image><link>http://technitip.net</link> <url>http://technitip.net/wp-content/plugins/maxblogpress-favicon/icons/favicon-66.ico</url><title>TechniTip.Net</title> </image> <item><title>Happy Birthday Apache!</title><link>http://technitip.net/happy-birthday-apache</link> <comments>http://technitip.net/happy-birthday-apache#comments</comments> <pubDate>Tue, 23 Feb 2010 20:14:43 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Linux Server]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[Apache Software Foundation]]></category> <category><![CDATA[Birthday]]></category> <guid
isPermaLink="false">http://technitip.net/?p=1408</guid> <description><![CDATA[The Apache Web Server has a reason to party, it&#8217;s 15th anniversary! Powering more than 112 million website. Congratulations! Read more on Apache Software Foundation Blog. Related posts: Howto Restart Apache Graceful Apache Tuning Part 2 Apache Tuning Part 1<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/howto-restart-apache-graceful' rel='bookmark' title='Howto Restart Apache Graceful'>Howto Restart Apache Graceful</a></li><li><a
href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li><li><a
href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>The Apache Web Server has a reason to party, it&#8217;s 15th anniversary! Powering more than 112 million website. Congratulations!</p><p>Read more on <a
title="The Apache Software Foundation Announces the 15th Anniversary of the Apache HTTP Web Server " href="https://blogs.apache.org/foundation/entry/the_apache_software_foundation_announces2" target="_blank">Apache Software Foundation Blog</a>.</p><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fhappy-birthday-apache&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/howto-restart-apache-graceful' rel='bookmark' title='Howto Restart Apache Graceful'>Howto Restart Apache Graceful</a></li><li><a
href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li><li><a
href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/happy-birthday-apache/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Howto Restart Apache Graceful</title><link>http://technitip.net/howto-restart-apache-graceful</link> <comments>http://technitip.net/howto-restart-apache-graceful#comments</comments> <pubDate>Sat, 24 Jan 2009 11:46:53 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Apache]]></category> <category><![CDATA[graceful]]></category> <category><![CDATA[restart]]></category> <guid
isPermaLink="false">http://technitip.net/?p=435</guid> <description><![CDATA[Sometimes when changing settings in your Apache config, adding virtual hosts and so on it&#8217;s needed to reload/restart the Apache daemon. Usually this is done with: /etc/init.d/apache2 restart But there two big disadvantages using this method: If your config is invalid, Apache will shutdown and not start again Users currently accessing your server will recognize [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li><li><a
href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li><li><a
href='http://technitip.net/apache-tuning-part-3' rel='bookmark' title='Apache Tuning Part 3'>Apache Tuning Part 3</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>Sometimes when changing settings in your Apache config, adding virtual hosts and so on it&#8217;s needed to reload/restart the Apache daemon. Usually this is done with:<br
/> <code><br
/> /etc/init.d/apache2 restart<br
/> </code></p><p>But there two big disadvantages using this method:</p><ol><li>If your config is invalid, Apache will shutdown and not start again</li><li>Users currently accessing your server will recognize that Apache will not answer request for a short time</li></ol><p>Indeed there is a much more better method to restart the Apache &#8220;gracefully&#8221;:<br
/> <code><br
/> apache2ctl -t<br
/> Syntax OK</code><br
/> <code><br
/> apache2ctl -k graceful<br
/> </code><br
/> The first command will tell Apache to check your config. If everything is correct, you will get &#8220;Syntax OK&#8221;, otherwise the error will be reported but Apache will still run with the old configuration.</p><p>The second command will tell Apache to restart gracefully with the advantage that currently open connections are not aborted and the users will not be annoyed.</p><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fhowto-restart-apache-graceful&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li><li><a
href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li><li><a
href='http://technitip.net/apache-tuning-part-3' rel='bookmark' title='Apache Tuning Part 3'>Apache Tuning Part 3</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/howto-restart-apache-graceful/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Domain Redirects</title><link>http://technitip.net/domain-redirects</link> <comments>http://technitip.net/domain-redirects#comments</comments> <pubDate>Fri, 16 Jan 2009 19:18:54 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Apache]]></category> <category><![CDATA[avoid]]></category> <category><![CDATA[content]]></category> <category><![CDATA[domain]]></category> <category><![CDATA[double]]></category> <category><![CDATA[google]]></category> <category><![CDATA[redirect]]></category> <guid
isPermaLink="false">http://technitip.net/?p=353</guid> <description><![CDATA[Avoid Double Content There are two reasons to redirect e.g. mydomain1.de to www.mydomain1.de: It avoids detecting search machines &#8220;double content&#8221; I personally prefer having one unique URL for a homepage, also if a user enters mydomain1.de he will be redirected to www.mydomain1.de RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^mydomain\.de$ [NC] RewriteRule ^(.*) http://www.mydomain.de/$1 [L,R=301] The [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/iphone-whois-tool-domain-scout' rel='bookmark' title='Whois Tool &#8220;Domain Scout&#8221; for iPhone'>Whois Tool &#8220;Domain Scout&#8221; for iPhone</a></li><li><a
href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li><li><a
href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p><strong>Avoid Double Content</strong></p><p>There are two reasons to redirect e.g. mydomain1.de to www.mydomain1.de:</p><ol><li>It avoids detecting search machines &#8220;double content&#8221;</li><li>I personally prefer having one unique URL for a homepage, also if a user enters mydomain1.de he will be redirected to www.mydomain1.de</li></ol><pre>RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^mydomain\.de$ [NC]
RewriteRule ^(.*) http://www.mydomain.de/$1 [L,R=301]</pre><p>The redirect is defined as 301 &#8220;permanent&#8221;. Please note that these rewrite settings only work if the correct setting for &#8220;AllowOverride&#8221; is done within the Apache settings of your host or virtual host configuration.</p><p><strong>Redirect Domain to another Domain</strong></p><p>If you want to redirect a complete domain, here mydomain1.de including subdomains to another domain e.g. mydomain2.de put the following code into the .htaccess of the web root directory of mydomain1.de:</p><pre>RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(.*)mydomain1\.de$
RewriteRule ^(.*)$ http://www.mydomain2.de/$1 [R=301,L,NC]</pre><p>Using this rewrite condition all hosts *.mydomain1.de including mydomain1.de will be redirected to www.mydomain2.de. Everything behind .de/ will be kept.</p><p>Furthermore the redirect is defined as 301 which means permanent redirect. This will avoid that search machines like Goole will treat you with &#8220;double content&#8221;.</p><p><strong>Hint</strong></p><p>Be sure you have enabled &#8220;Options FollowSymLinks&#8221; or Options &#8220;SymLinksIfOwnerMatch&#8221; in your Apache or virtual host config. Otherwise mod rewrite will not work!</p><p>Working with Apache/2.2.3</p><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fdomain-redirects&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/iphone-whois-tool-domain-scout' rel='bookmark' title='Whois Tool &#8220;Domain Scout&#8221; for iPhone'>Whois Tool &#8220;Domain Scout&#8221; for iPhone</a></li><li><a
href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li><li><a
href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/domain-redirects/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Apache Tuning Part 3</title><link>http://technitip.net/apache-tuning-part-3</link> <comments>http://technitip.net/apache-tuning-part-3#comments</comments> <pubDate>Tue, 30 Dec 2008 11:18:38 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Apache]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[tuning]]></category> <guid
isPermaLink="false">http://planlos.org/~harry/php/?p=50</guid> <description><![CDATA[Some further settings which worked well for a server (1GB RAM, single CPU) with max. 120 users simultaneously and doing some video streaming. Settings are found in /etc/apache2/apache.conf Timeout 30 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 5 &#60;IfModule mpm_prefork_module&#62; StartServers         16 ServerLimit         512 MinSpareServers      16 MaxSpareServers      128 MaxClients          256 MaxRequestsPerChild 55555 &#60;/IfModule&#62; HostnameLookups Off ServerTokens Prodme [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li><li><a
href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li><li><a
href='http://technitip.net/mysql-performance-tips' rel='bookmark' title='MySQL Performance Tips'>MySQL Performance Tips</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>Some further settings which worked well for a server (1GB RAM, single CPU) with max. 120 users simultaneously and doing some video streaming. Settings are found in /etc/apache2/apache.conf</p><pre>Timeout 30
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
&lt;IfModule mpm_prefork_module&gt;
StartServers         16
ServerLimit         512
MinSpareServers      16
MaxSpareServers      128
MaxClients          256
MaxRequestsPerChild 55555
&lt;/IfModule&gt;
HostnameLookups Off
ServerTokens Prodme
ServerSignature Off
UseCanonicalName Off
TraceEnable Off</pre><p>HostNameLookups Off are recommended in any case.</p><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fapache-tuning-part-3&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li><li><a
href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li><li><a
href='http://technitip.net/mysql-performance-tips' rel='bookmark' title='MySQL Performance Tips'>MySQL Performance Tips</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/apache-tuning-part-3/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Apache Tuning Part 2</title><link>http://technitip.net/apache-tuning-part-2</link> <comments>http://technitip.net/apache-tuning-part-2#comments</comments> <pubDate>Tue, 30 Dec 2008 11:12:57 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Apache]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[tuning]]></category> <guid
isPermaLink="false">http://planlos.org/~harry/php/?p=43</guid> <description><![CDATA[Let&#8217;s assume your web server has high disc IO. Every access to a .PHP, .HTML, .JPG, .GIF, etc wil cause a log entry which will be stored on hard disc. In such a case it helps to disable all apache loggings. You can check the opened log file from apache using the command: lsof &#124;grep [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li><li><a
href='http://technitip.net/apache-tuning-part-3' rel='bookmark' title='Apache Tuning Part 3'>Apache Tuning Part 3</a></li><li><a
href='http://technitip.net/howto-restart-apache-graceful' rel='bookmark' title='Howto Restart Apache Graceful'>Howto Restart Apache Graceful</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>Let&#8217;s assume your web server has high disc IO. Every access to a .PHP, .HTML, .JPG, .GIF, etc wil cause a log entry which will be stored on hard disc. In such a case it helps to <strong>disable all apache loggings</strong>.</p><p>You can check the opened log file from apache using the command:</p><pre>lsof |grep apache|grep log</pre><p>Oh yes, if you serve lot&#8217;s of domains on your server this list will be quite long. To disable logging just uncomment the corresponding lines e.g. in your virtual host definition:</p><pre>#ErrorLog /var/log/apachd2/mydonain.de-error_log
#CustomLog /var/log/apache2/mydomain.de-access_log combined</pre><p>Afterwards check your apace configuration for errors:</p><pre>apache2ctl -t</pre><p>In case of syntax OK just restart your apache server:</p><pre>apache2ctl -k graceful</pre><p>This command is qute because it does a &#8220;graceful&#8221; restart without anoying users accesing your server right now.</p><p><strong>Hint</strong></p><p>How to check if my disc IO is high?</p><p>Use the command &#8220;vmstat 1&#8243; and check the section &#8220;IO&#8221; (what else&#8230;). You will see bi and bo which means blocks received and blocks sent. In case the numbers are high, you will have high disc IO.</p><pre>procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
0  0 659476  41604   8732 347304    3    3    37    41   20   14 19  7 58 16
3  0 659476  41604   8732 347336    0    0     0     0  410  314  7  0 93  0
0  0 659476  41464   8740 347328    0    0     0   424  522  321 11  1 86  2</pre><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fapache-tuning-part-2&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li><li><a
href='http://technitip.net/apache-tuning-part-3' rel='bookmark' title='Apache Tuning Part 3'>Apache Tuning Part 3</a></li><li><a
href='http://technitip.net/howto-restart-apache-graceful' rel='bookmark' title='Howto Restart Apache Graceful'>Howto Restart Apache Graceful</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/apache-tuning-part-2/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Apache Tuning Part 1</title><link>http://technitip.net/apache-tuning-part-1</link> <comments>http://technitip.net/apache-tuning-part-1#comments</comments> <pubDate>Tue, 30 Dec 2008 10:44:04 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Apache]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[tuning]]></category> <guid
isPermaLink="false">http://planlos.org/~harry/php/?p=32</guid> <description><![CDATA[This article applies to apache version 2.2.3 also it will work for other versions. Apache needs a lot of memory, this will decrease performance on a machine with e.g. 1 GByte memory and about 60 users accessing the server simultaneously a lot. There is a simply method to save memory: disable all unused modules. Yes, [...]<div
style="clear: both;"> <strong>Related posts:</strong><ol><li><a
href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li><li><a
href='http://technitip.net/apache-tuning-part-3' rel='bookmark' title='Apache Tuning Part 3'>Apache Tuning Part 3</a></li><li><a
href='http://technitip.net/howto-restart-apache-graceful' rel='bookmark' title='Howto Restart Apache Graceful'>Howto Restart Apache Graceful</a></li></ol></div>]]></description> <content:encoded><![CDATA[<p>This article applies to apache version 2.2.3 also it will work for other versions.</p><p>Apache needs a lot of memory, this will decrease performance on a machine with e.g. 1 GByte memory and about 60 users accessing the server simultaneously a lot. There is a simply method to save memory: <strong>disable all unused modules</strong>. Yes, it really helps!</p><p>Why does it help? Because every apache process started &#8211; and a lot will be started when several users are accessing the server &#8211; will load all enabled modules.</p><p>To get an overview how much memory is consumed by the modules use the command</p><pre>lsof | grep apache | grep modules</pre><p>Using this command you will also see which modules consumes much memory.</p><p>In my case only the following modules are used:</p><ul><li>actions.load</li><li>authz_default.load</li><li>authn_file.load</li><li>auth_basic.load</li><li>authz_user.load</li><li>env.load</li><li>mime.load</li><li>rewrite.load</li><li>userdir.load</li><li>alias.load</li><li>authz_host.load</li><li>deflate.load</li><li>expires.load</li><li>negotiation.load</li><li>setenvif.load</li><li>headers.load</li><li>speling.load</li><li>cgi.load</li><li>dir.load</li><li>include.load</li><li>php5.load</li></ul><p>Modules which are not needed are disabled using the command</p><pre>a2dismod &lt;module_name&gt;</pre><div
id="facebook_like"><iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fapache-tuning-part-1&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div
style="clear: both;"><p><strong>Related posts:</strong><ol><li><a
href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li><li><a
href='http://technitip.net/apache-tuning-part-3' rel='bookmark' title='Apache Tuning Part 3'>Apache Tuning Part 3</a></li><li><a
href='http://technitip.net/howto-restart-apache-graceful' rel='bookmark' title='Howto Restart Apache Graceful'>Howto Restart Apache Graceful</a></li></ol></p></div>]]></content:encoded> <wfw:commentRss>http://technitip.net/apache-tuning-part-1/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
