<?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>RedHatVN Network &#187; Apache</title>
	<atom:link href="http://redhatvn.net/tag/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://redhatvn.net</link>
	<description>Shared Linux problems</description>
	<lastBuildDate>Mon, 31 Oct 2011 07:10:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>[HOWTO] mod_ruid2</title>
		<link>http://redhatvn.net/howto-mod_ruid2</link>
		<comments>http://redhatvn.net/howto-mod_ruid2#comments</comments>
		<pubDate>Fri, 03 Sep 2010 08:03:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=1257</guid>
		<description><![CDATA[Hello everyone, Since there are alot of people asking for it, here is my HowTo about mod_ruid2 This is based on my CentOS server with Apache 2.x. Installing this module its no longer needed to chmod config files to 666 or upload/attachments directories to 777. Since with this module enabled everything @ HTTP will run [...]]]></description>
			<content:encoded><![CDATA[<div class="google_plus_one"><g:plusone size="medium" count="true" url="http://redhatvn.net/howto-mod_ruid2"></g:plusone></div><p>Hello everyone,</p>
<p>Since there are alot of people asking for it, here is my HowTo about mod_ruid2<br />
This is based on my CentOS server with Apache 2.x.</p>
<p><strong>Installing this module its no longer needed to chmod config files to  666 or upload/attachments directories to 777. Since with this module  enabled everything @ HTTP will run under the user itself and not  &#8216;apache&#8217; anymore.</strong><br />
<span id="more-1257"></span><br />
** If you are using mod_ruid instead of mod_ruid2, first of all remove the mod_ruid line from &#8216;<strong>/etc/httpd/conf/httpd.conf</strong>&#8216;</p>
<p>First, we are going to install <strong>libcap-devel</strong><br />
<code>yum -y install libcap-devel</code><br />
After this is done we are going to download and install mod_ruid2<br />
<code>wget <a href="http://dave.t0xic.nl/tars/mod_ruid2-0.9.tar.bz2" target="_blank">http://dave.t0xic.nl/tars/mod_ruid2-0.9.tar.bz2</a><br />
tar xjf mod_ruid2-0.9.tar.bz2<br />
cd mod_ruid2-0.9<br />
apxs -a -i -l cap -c mod_ruid2.c</code></p>
<p>Now, if you didn&#8217;t get any errors mod_ruid2 should be installed and added to the &#8216;<strong>/etc/httpd/conf/httpd.conf</strong>&#8216;.<br />
Lets confirm mod_ruid2 is added<br />
<code>grep 'mod_ruid2' /etc/httpd/conf/httpd.conf</code><br />
If you get any response like below its installed</p>
<blockquote><p>LoadModule ruid2_module       /usr/lib/apache/mod_ruid2.so</p></blockquote>
<p>Now we need to modify the DA httpd.conf templates a little bit to enable mod_ruid2 for the users</p>
<p>Now copy the template files to custom<br />
<code>cd /usr/local/directadmin/data/templates/<br />
cp virtual_host2* custom/<br />
chown -R diradmin:diradmin custom/</code></p>
<p>Now you have copied the original templates to the &#8216;custom&#8217; directory, so they won&#8217;t be overwritten.</p>
<p>Now follow the steps below for each virtual_host2 file you&#8217;ve copied<br />
<code>nano -w virtual_host2.conf</code></p>
<blockquote><p>## replace line: <strong>SuexecUserGroup |USER| |GROUP|</strong><br />
## replace with: <strong>#SuexecUserGroup |USER| |GROUP|</strong><br />
## Add the lines below under the just replaced line<br />
RMode          config<br />
RUidGid        |USER| |GROUP|<br />
RGroups        apache</p></blockquote>
<p>Save the files and lets rewrite the HTTPd config files<br />
<code>echo "action=rewrite&amp;value=httpd" &gt;&gt; /usr/local/directadmin/data/task.queue</code></p>
<p>If you want you can start the rewrite of the HTTPd config files manually, just paste the line below and wait when its done<br />
<code>/usr/local/directadmin/dataskq d800</code><br />
After the rewrite is complete you can restart HTTPd with the command below<br />
<code>/etc/init.d/httpd restart</code><br />
Now mod_ruid2 should be installed and you don&#8217;t need to chmod anymore like &#8216;chmod 666 config.php&#8217; or &#8216;chmod 777 uploads&#8217;.</p>
<p>To be sure the webmail clients etc still works we need to change the owner permissions<br />
<code>chown -R webapps:webapps /var/www/html</code></p>
<p>** Questions with Answers **<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>Q:</strong> How can I test this is working?<br />
<strong>A:</strong> Easy, install some CMS that you are used before. Like  WordPress, Joomla that required (before!!) chmod 666 or 777 to get  install/working.</p>
<p><strong>Q:</strong> I&#8217;ve dirs/files owned by apache for some users, must I change this?<br />
<strong>A:</strong> Yes, you need to give the dirs/files owner of the user itself, not apache anymore. Check below<br />
<span style="text-decoration: underline;">Thanks for snk for the commands below, to fix the owner permissions of the dirs/files</span></p>
<p><code>cd /usr/local/directadmin/scripts &amp;&amp; ./set_permissions.sh user_homes<br />
find /home/*/domains/*/public_html -type d -print0 | xargs -0 chmod 711<br />
find /home/*/domains/*/public_html -type f -print0 | xargs -0 chmod 644<br />
cd /usr/local/directadmin/data/users &amp;&amp; for i in `ls`; do { chown -R $i:$i /home/$i/domains/*/public_html;}; done;</code></p>
<p><em>* Added &#8216;&amp;&amp;&#8217; so if they do a typo, it won&#8217;t change anything.</em></p>
<p>You are missing a question, or you have a question, please let me know and I&#8217;ll try to answer them for you!</p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/howto-mod_ruid2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Update Webalizer Stats on Directadmin</title>
		<link>http://redhatvn.net/how-to-update-webalizer-stats-on-directadmin</link>
		<comments>http://redhatvn.net/how-to-update-webalizer-stats-on-directadmin#comments</comments>
		<pubDate>Tue, 01 Jun 2010 03:56:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://redhatvn.net/how-to-update-webalizer-stats-on-directadmin</guid>
		<description><![CDATA[As you know, Webalizer stats are usually updated once a day, when using a Directadmin server. What to do, if you need more current stats? Here are some solutions (work good for me on CentOS 5). If you need to update all server accounts, just type in the following command as root: echo "action=tally&#38;value=all" &#62;&#62; [...]]]></description>
			<content:encoded><![CDATA[<div class="google_plus_one"><g:plusone size="medium" count="true" url="http://redhatvn.net/how-to-update-webalizer-stats-on-directadmin"></g:plusone></div><p>As you know, Webalizer stats are usually updated once a day, when  using a Directadmin server. What to do, if you need more current stats?  Here are some solutions (work good for me on CentOS 5).</p>
<p>If you need to update all server accounts, just type in the following  command as root:</p>
<p><code>echo "action=tally&amp;value=all" &gt;&gt;  /usr/local/directadmin/data/task.queue</code></p>
<p>In order to update stats for a single domain, here is another  command:</p>
<p><code>/usr/bin/webalizer -p -n |DOMAIN| -o  /home/|USER|/domains/|DOMAIN|/stats /var/log/httpd/domains/|DOMAIN|.log</code></p>
<p>Just replace |USER| with domain username and |DOMAIN| with domain  itself and have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/how-to-update-webalizer-stats-on-directadmin/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>wtop – Apache Web Server Log Analyser</title>
		<link>http://redhatvn.net/wtop-%e2%80%93-apache-web-server-log-analyser</link>
		<comments>http://redhatvn.net/wtop-%e2%80%93-apache-web-server-log-analyser#comments</comments>
		<pubDate>Fri, 25 Dec 2009 07:56:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[domlogs]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=1035</guid>
		<description><![CDATA[How to Install and Configure wtop – Apache Web Server Log Analyser wtop is really cool application for web server log analysis and to see server stats at a glance. It also has powerful log grepping capability. It is just like ‘top’ for your webserver It can find out number of searches or signups per [...]]]></description>
			<content:encoded><![CDATA[<div class="google_plus_one"><g:plusone size="medium" count="true" url="http://redhatvn.net/wtop-%e2%80%93-apache-web-server-log-analyser"></g:plusone></div><h1>How to Install and Configure wtop – Apache Web Server Log Analyser</h1>
<p>wtop is really cool application for web server log analysis and to see server stats at a glance. It also has powerful log grepping capability. It is just like ‘top’ for your webserver</p>
<p>It can find out number of searches or signups per seconds. It can also create histogram of response time. There is also another tool called logrep a powerful command-line program for ad-hoc analysis and filtering for log files. You can dig up lots of information using wtop tools.<br />
<span id="more-1035"></span><br />
You need Python version 2.5 to run wtop.</p>
<h2>Download wtop</h2>
<p>Type the following command:</p>
<blockquote><p><code>$ cd /tmp<br />
$ wget  http://wtop.googlecode.com/files/wtop-0.5.6.tar.gz<br />
$ tar -zxvf  wtop-0.5.6.tar.gz<br />
$ cd wtop-0.5.6<br />
# python setup.py install</code></p></blockquote>
<p><strong>Configuring wtop</strong><br />
Once installed you can start using the tool immediately. You need to edit /etc/wtop.cfg file to setup parameters, Apache log files and other directives</p>
<blockquote><p><code># vi /etc/wtop.cfg</code></p></blockquote>
<p>Now simply type wtop at a shell prompt:</p>
<blockquote><p><code>$ wtop$ </code></p></blockquote>
<p>See all  human traffic, enter:<br />
<code>$ logrep -m top -h access.log</code><br />
See  response times for all MSNBot homepage hits:<br />
<code>$ logrep -m grep -g MSNBot  -i home -o status,msec,url access.log</code><br />
Display the current log for  traffic to pages about wordpress or themes sent from google.com<br />
<code>$  logrep -m tail --f 'url~wordpress|themes,ref~google.com' access.log</code></p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/wtop-%e2%80%93-apache-web-server-log-analyser/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Install and Configure Apachetop</title>
		<link>http://redhatvn.net/how-to-install-and-configure-apachetop</link>
		<comments>http://redhatvn.net/how-to-install-and-configure-apachetop#comments</comments>
		<pubDate>Fri, 25 Dec 2009 07:51:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=1031</guid>
		<description><![CDATA[Apachetop is a curses-based top-like display for Apache information, including requests per second, bytes per second, most popular URLs, etc. Apachetop watches a logfile generated by Apache (in standard common or combined logformat, although it doesn’t (yet) make use of any of the extra fields in combined) and generates human-parsable output in realtime. Installing on [...]]]></description>
			<content:encoded><![CDATA[<div class="google_plus_one"><g:plusone size="medium" count="true" url="http://redhatvn.net/how-to-install-and-configure-apachetop"></g:plusone></div><p><strong>Apachetop</strong> is a curses-based top-like display for Apache information, including requests per second, bytes per second, most popular URLs, etc.</p>
<p><strong>Apachetop</strong> watches a logfile generated by Apache (in standard common or combined logformat, although it doesn’t (yet) make use of any of the extra fields in combined) and generates human-parsable output in realtime.<br />
<span id="more-1031"></span><br />
<span style="color: #993300;"><strong>Installing on Ubuntu</strong></span></p>
<blockquote><p><code>sudo apt-get install apachetop</code></p></blockquote>
<p><span style="color: #993300;"><strong>Installing from Source on CentOS</strong></span></p>
<blockquote><p><code>wget <a title="http://www.webta.org/apachetop/apachetop-0.12.6.tar.gz" href="http://www.webta.org/apachetop/apachetop-0.12.6.tar.gz">http://www.webta.org/apachetop/apachetop-0.12.6.tar.gz</a></code></p>
<p><code>yum install readline-devel<br />
yum install ncurses-devel<br />
tar xvzf apachetop-0.12.6.tar.gz</code></p>
<p><code>cd apachetop-0.12.6<br />
./configure<br />
make<br />
make install</code></p></blockquote>
<p>The binary can be found in src/apachetop, and you can copy it anywhere you’d like.</p>
<p><span style="color: #993300;"><strong>Installing from Source on Ubuntu</strong></span></p>
<blockquote><p><code>wget <a title="http://www.webta.org/apachetop/apachetop-0.12.6.tar.gz" href="http://www.webta.org/apachetop/apachetop-0.12.6.tar.gz">http://www.webta.org/apachetop/apachetop-0.12.6.tar.gz</a></code></p>
<p><code>sudo apt-get install ncurses-dev<br />
sudo apt-get install libreadline5-dev<br />
tar xvzf apachetop-0.12.6.tar.gz</code></p>
<p><code>cd apachetop-0.12.6<br />
./configure<br />
make<br />
make install</code></p></blockquote>
<p><span style="color: #993300;"><strong>Using Apachetop</strong></span></p>
<p>Once you’ve installed the utility (instructions below), you can launch it by simply running apachetop from the command line. Since apachetop sometimes defaults to the wrong directory for the logfiles, you can pass in the -f parameter to specify the location of the logfile. This is also helpful when you have many virtual hosts on the same box.</p>
<blockquote><p><code>apachetop -f /var/www/vhosts/howtogeek.com/statistics/logs/access_log</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/how-to-install-and-configure-apachetop/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Log Files on a cPanel server</title>
		<link>http://redhatvn.net/log-files-on-a-cpanel-server</link>
		<comments>http://redhatvn.net/log-files-on-a-cpanel-server#comments</comments>
		<pubDate>Fri, 25 Dec 2009 05:57:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[domlogs]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=969</guid>
		<description><![CDATA[Following are the logs files on a cPanel server for different services: Apache Logs: /usr/local/apache/logs/access_log /usr/local/apache/logs/error_log Exim Logs: /var/log/exim_mainlog /var/log/exim_paniclog /var/log/exim_rejectlog Ftp Logs: /var/log/messages Mysql Logs: /var/lib/mysql/server.hostname.err ChkServd Logs: /var/log/chkservd.log Named (Bind) Logs: /var/log/messages Last logins to server: /var/log/wtmp (but to view the details, execute the command “last”) Domlogs of an Account: /usr/local/apache/domlogs/domainname.tld Mod Security [...]]]></description>
			<content:encoded><![CDATA[<div class="google_plus_one"><g:plusone size="medium" count="true" url="http://redhatvn.net/log-files-on-a-cpanel-server"></g:plusone></div><p>Following are the <strong>logs files on a cPanel server for different services</strong>:<br />
<span id="more-969"></span><br />
<strong>Apache Logs:</strong></p>
<blockquote><p><span style="color: #ff6600;"><strong>/usr/local/apache/logs/access_log<br />
/usr/local/apache/logs/error_log</strong></span></p></blockquote>
<p><strong>Exim Logs:</strong></p>
<blockquote><p><span style="color: #ff6600;"><strong>/var/log/exim_mainlog<br />
/var/log/exim_paniclog<br />
/var/log/exim_rejectlog</strong></span></p></blockquote>
<p><strong>Ftp Logs:</strong></p>
<blockquote><p><span style="color: #ff6600;"><strong>/var/log/messages</strong></span></p></blockquote>
<p><strong>Mysql Logs:</strong></p>
<blockquote><p><span style="color: #ff6600;"><strong>/var/lib/mysql/server.hostname.err</strong></span></p></blockquote>
<p><strong>ChkServd Logs:</strong></p>
<blockquote><p><span style="color: #ff6600;"><strong>/var/log/chkservd.log</strong></span></p></blockquote>
<p><strong>Named (Bind) Logs:</strong></p>
<blockquote><p><span style="color: #ff6600;"><strong>/var/log/messages</strong></span></p></blockquote>
<p><strong>Last logins to server:</strong></p>
<blockquote><p><strong><span style="color: #ff6600;">/var/log/wtmp</span> (but to view the details, execute the command “last”)</strong></p></blockquote>
<p><strong> </strong></p>
<p><strong>Domlogs of an Account:</strong></p>
<blockquote><p><span style="color: #ff6600;"><strong>/usr/local/apache/domlogs/domainname.tld</strong></span></p></blockquote>
<p><strong>Mod Security Logs:</strong></p>
<blockquote><p><span style="color: #ff6600;"><strong>/usr/local/apache/logs/modsec_audit.log<br />
/usr/local/apache/logs/modsec_debug_log</strong></span></p></blockquote>
<p><strong>Apache SUEXEC Logs:</strong></p>
<blockquote><p><span style="color: #ff6600;"><strong>/usr/local/apache/logs/suexec_log</strong></span></p></blockquote>
<p><strong>cPanel Access and Error Logs:</strong></p>
<blockquote><p><span style="color: #ff6600;"><strong>/usr/local/cpanel/logs/access_log<br />
/usr/local/cpanel/logs/error_log</strong></span></p></blockquote>
<p><strong>Stats Logs:</strong></p>
<blockquote><p><span style="color: #ff6600;"><strong>/usr/local/cpanel/logs/stats_log</strong></span></p></blockquote>
<p><strong>cPanel License Logs:</strong></p>
<blockquote><p><span style="color: #ff6600;"><strong>/usr/local/cpanel/logs/license_log</strong></span></p></blockquote>
<p><strong>cPanel Backup Logs:</strong></p>
<blockquote><p><span style="color: #ff6600;"><strong>/usr/local/cpanel/logs/cpbackup/*.log</strong></span></p></blockquote>
<p><strong>Tomcat Logs:</strong></p>
<blockquote><p><span style="color: #ff6600;"><strong>/usr/local/jakarta/tomcat/logs/catalina.err<br />
/usr/local/jakarta/tomcat/logs/catalina.out</strong></span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/log-files-on-a-cpanel-server/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
