Add

Wednesday, 6 November 2013

ESSENTIALS OF APACHE WEB SERVER


ESSENTIALS OF APACHE WEB SERVER

Apache Web Server Installation Notes


Install command
Install httpd service boot script start at  boot time
Starting  httpd
Fedora / RHEL / Cent OS
# yum install httpd

# chkconfig httpd on

# /etc/init.d/httpd start
Debian Linux
# apt-get install apache2
# update-rc.d apache2 defaults

# /etc/init.d/apache2 start
Open SUSE
# zypper in apache2

# yast2 -i apache2
# chkconfig --add apache2

# /etc/init.d/apache2 start


Document root location and configuration scripts


Document root of the default web site
httpd.conf location
Fedora / RHEL / Cent OS
# /var/www/html
# /etc/httpd/conf/httpd.conf
Debian Linux
# /var/www/
# /etc/apache2/apache2.conf

# /etc/apache2/ports.conf
Open SUSE
# cd /srv/www/htdocs/

# /etc/apache2/httpd.conf


Compiling and Installing

Compiling and Installing
Download
# lynx http://httpd.apache.org/download.cgi
Extract
# gzip -d  httpd-2.4.6.tar.gz
# tar xvf  httpd-2.4.6.tar.gz
# cd  httpd-2.4.6
Configure
# ./configure --prefix= /usr/local/apache2/
Compile
# make
Install
# make install
Customize
# vi /usr/local/apache2/conf/httpd.conf
Test
#  /usr/local/apache2/bin/apachectl -k start




Other essential details of Apache
server log
/etc/httpd/logs                     à( symbolic link)

/var/log/httpd
server modules
/etc/httpd/modules             à( symbolic link)

/usr/lib/httpd/modules
server process ID
/var/run                                 à( symbolic link)
           
/var/run/httpd.pid


No comments:

Post a Comment