Apache Installation And Configuration Under Centos/Redhat/Fedora
Service Used : httpd (Hyper Text Transfer Protocol Daemon)
Port used : 80
Document Root : /var/www/html
Configuration File : /etc/httpd/conf/httpd.conf
Installation
# yum install gcc
# yum install openssl-devel
# yum install httpd httpd-devel httpd-tools
# service httpd start
# yum install openssl-devel
# yum install httpd httpd-devel httpd-tools
# service httpd start
Enable httpd service to start automatically during system startup using chkconfig
# chkconfig httpd on
To Upgrade Apache
# yum check-update httpd
Upgrade Apache to latest version
# yum update httpd
Configuration
# vi /etc/httpd/conf/httpd.conf
Listen: 192.168.0.3:80 (search for the strings and modify)ServerName: 192.168.0.3:80
:wq!
# httpd -t
# service httpd restart
# service httpd restart
Virtual Server
# Entries same as main server
# vi /etc/httpd/conf/httpd.conf
NameVirtualHost 192.168.0.3:80<VirtualHost station3.example.com:80>
ServerAdmin webmaster@station3.example.com // admin's email id
DocumentRoot /var/www/html/station3 // path of index.html
ServerName station3.example.com // server name
ErrorLog logs/station3error_log // error log file
CustomLog logs/station3access_log common // common log file
</VirtualHost>
( For more virtual hosts add similar entries )
# service httpd restart
(For proper working of web server the DNS should be properly working, because dns is
resolving the host names entered in the web browser. The first page (home page) of all web
servers should have the name index.html. To create virtual host entries you can copy and modify
the example given in the configuration file.)
Apache Installation And Configuration Under Centos/Redhat/Fedora
Reviewed by vivek sathisan
on
12:30
Rating:

No comments: