Archive for the ‘Apache’ Category

useful apache server documentation link

Tuesday, December 15th, 2009

Prefix for configutraion: http://httpd.apache.org/docs/2.2/en/programs/configure.html#installationdirectories

How to configure nagios to work with apache source install(/usr/local/apache)

Monday, November 16th, 2009

Ref:http://nagios.sourceforge.net/docs/3_0/quickstart-fedora.html
Basic nagios setup  works well if you install apache server by yum. But if you install and configure Apache from source to run different directory(i.e /usr/local/apache)  other then /etc/httpd/conf then then the default nagios web interface would not work because , by default nagios creates nagios.conf file in /etc/httpd/conf.d directory for fedora.
So if you have [...]

How to compile php for GD library

Friday, November 13th, 2009

Install necessary software by yum or from source
yum install gd gd-devel yum install zlib zlib-devel

then

a) Download the php source from here : http://www.php.net/downloads.php
b) Download the source file in to /tmp directory
c) Here I am gussing the php version is php-5.3.0.tar.gz
d) Tar –xvzf php-5.3.0.tar.gz
e) Cd php-5.3.0
f)

./configure –with-apxs2=/usr/local/apache/bin/apxs –with-mysql=/usr/local/mysql –enable-mbstring –-with-gd –-with-zlib –-with-jpeg-dir –-with-png-dir

g) make
h) make install
i) setup your [...]

How to install apache2-php-mysql from source

Thursday, September 10th, 2009

Prerequisite : yum install gcc-c++ gcc make ncurses-devel openssl-devel
Packages required for php: yum install libjpeg-devel libpng-devel curl-devel libmcrypt-devel krb5-devel
Apache Server Installation from Source:
Apache installation directory is : /usr/local/apache
a) Download the apache source file from : http://httpd.apache.org/download.cgi
b) Download the source file in to /tmp directory.
c) I am guessing the source file is httpd-2.2.13.tar.gz
d) Cd /tmp
e) tar –xvzf httpd-2.2.13.tar.gz
f) cd httpd-2.2.13
g)

 
./configure –prefix=/usr/local/apache [...]

How to install mod_security by yum(Redhat-Centos 5)

Friday, August 28th, 2009

1.Download the EPEL repo :
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
2.Then type the following command :
yum install mod_security
Note : Mod_security require liblua-5.1.so, If you don’t have this , it will throw an error while installing by yum.

–> Processing Dependency: liblua-5.1.so for package: mod_security
–> Finished Dependency Resolution
mod_security-2.5.9-1.el5.i386 from epel has depsolving problems
–> Missing Dependency: liblua-5.1.so is needed by package mod_security-2.5.9- [...]

reverse proxying with apache

Wednesday, August 26th, 2009

Ref: http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
Module : mod_proxy.c
In httpd.conf , under bellow section all reverse proxy rules will go
<IfModule mod_proxy.c>
#ProxyRequests On
ProxyRequests Off
#
#<Proxy *>
# Order deny,allow
# Deny from all
# Allow from .example.com
#</Proxy>
#
# Enable/disable the handling of HTTP/1.1 “Via:” headers.
# (“Full” adds the server version; “Block” removes all outgoing Via: headers)
# [...]

How to allow perl/cgi script to run from virtualhost

Wednesday, August 26th, 2009

Ref: http://httpd.apache.org/docs/2.0/howto/cgi.html
If you want to run a perl script like this http://www.mydomain.com/test.pl , you will have to to define explicitly use the Options directive, inside your main server configuration file, to specify that CGI execution was permitted in a particular directory:
Example:
<VirtualHost *:80>
ServerAdmin adin@mydomain.co.uk
DocumentRoot [...]