Archive for the ‘Apache’ Category

Installing SVN on Cpanel with mod_dav_svn support

Wednesday, April 22nd, 2009

This howto helps to install SVN (subversion  ) on a cpanel server
Since Cpanel compiles httpd from source ; it is best we compile svn also from source and install the mod_dav_svn apache2 module along with it. Please note that you must have apache2.0 inoder for this to work
Step1 - mod_dav_svn requires mod_dav to be present.So [...]

How to choose a MPM module

Monday, April 6th, 2009

This is not an indepth topic but i will explain the difference between a prefork MPM and worker MPM. ( reference:- apache.org )
Before you start reading anything about MPM, multi threading etc first thing you need to understand is the difference between a  Process and a Thread and then everything would turn out to be [...]

mod_security

Monday, March 30th, 2009

Error :-
=====================
ModSecurity: Access denied with code 500 (phase 2). Match of “rx ^HTTP/(0\\\\.9|1\\\\.0|1\\\\.1)$” against “REQUEST_PROTOCOL” required. [file "/usr/local/apache/conf/modsec2/rules.conf"] [line "38"] [id "340000"] [msg "Bad HTTP Protocol"] [severity "ALERT"] [hostname "www.xxxxxx.com"] [uri "/favicon.ico"] [unique_id "OuT1Q0VI6HoAAQvX@BIAAAAJ"]
=====================
You might receive this error at times if mod_security is not properly configured. If you happen to receive this error make the [...]

Apache 2.2.10 + php 4.4.9 ( cgi ) + php5.2.6 ( dso ) Compilation

Thursday, November 6th, 2008

After Apache Compilation , download php4 and php5 source and untar the same. Go to php4 source dir :-
PHP4 as CGI
==========
cd /usr/local/php-4.4.9
./configure –prefix=/usr/local/php4 –with-mysql=/var/lib/mysql –with-mysql-sock=/var/lib/mysql/mysql.sock
make
make install
edit httpd.conf
==========
uncomment ScriptAlias /cgi-bin/ “/usr/local/apache/cgi-bin/”
cd /usr/local/apache/cgi-bin
ln /usr/local/bin/php php
edit php.conf
=========
Action application/x-httpd-php4 /cgi-bin/php
AddType application/x-httpd-php4 .php4
AddHandler application/x-httpd-php4 .php4
Give include_path in php.ini as  /usr/local/php4/lib/php
PHP 5 as CLI
==========
cd /usr/local/php-5.2.26
./configure –with-apxs2=/usr/local/apache/bin/apxs –enable-ftp
make
make install
Check for LoadModule [...]

List of Different web servers on GNU Linux

Friday, September 19th, 2008

Today we have different web servers available on the GNU/Linux platform.Here i am listing only the web servers that can be used for a mainstream web hosting environment
The web servers can be classified basically into 2
1. Process based webserver - In a process based web server each new connection is handled by a new web [...]

apache startup fail

Monday, July 21st, 2008

You may sometimes encounter the following problem while starting apache server
====
[root@epsilon root]# /etc/init.d/httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs
[FAILED]
====
To fix this run the following commands
fuser -k -n tcp 443

Apache mod_proxy

Saturday, July 19th, 2008

Imagine your domain has ROR ( Ruby On Rails ) installed and it connects on port 1200
eg :- http://gnusys.net:1200 and you want to change the way it appears on the address bar as simply http://gnusys.net. Normally Apache won’t allow this as it is configured to work on port 80 as you all know. But [...]

Semaphore Arrays

Friday, July 18th, 2008

Semaphore, it is a lot like a locking mechanism. In any server there is an order of precedence in which tasks must be accomplished. The semaphore is used to maintain that precedence order; more to the point, the precedence order is maintained by the semaphores. A succeeding task may not start until it has received [...]

Troubleshooting common Apache HTTPD problems

Saturday, June 14th, 2008

Check your error_log
* The first place to look
* Increase the LogLevel if needed
* Make sure to turn it back down (but not off) in production
Check System Health
* vmstat, systat, iostat, mpstat, lockstat, etc…
* Check interrupt load
o NIC might be overloaded
* Are you swapping memory?
o A web server should never swap
* Check system logs
o /var/log/message, /var/log/syslog, [...]

apache2 mod_suphp php-cgi

Thursday, May 22nd, 2008

A slight change in the setup and now i can see the user who is executing the scripts in my website
Before when apache intrepets a php script it calls fastcgi which inturn calls the php cgi binary.But still the php binary is executed as the calling user which in our case is the user [...]