Configure DHCP | Apache Web Server Configuration - VPS Virtual Private Server


DHCP - Dynamic Host Configuration Protocol.
DHCP it is provide the IP address Dynamically to the client System.

Install dhcp
[root@bashscript ~]# yum install dhcp*
Copy the configuration File
[root@bashscript ~]# cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
cp: overwrite `/etc/dhcpd.conf'? y
Edit the Configuration File
[root@bashscript ~]# vi /etc/dhcpd.conf
subnet netmask { -- line 4
range dynamic-bootp; --line 21
Then enable the DHCP in the client Network.
Restart the client system Network.
Using Ifconfig command identify the client system IP.

Configure And Maintain Apache Web Server
Install http service
1)[root@bashscript ~]#yum install http*
2)[root@bashscript ~]#cd /etc/httpd/conf/httpd.conf
Go to last 7 line edit as per below
<virtualhost> #Ipaddress:http port :80
Document Root /var/www/html/
3)Then go to the /var/www/html Directory
Create the Index page for that server
4)Setup your local system IP as as in /etc/hosts file
5)Restart the httpd service.
6)Then try in your browser as

Add Virtual Web Host - VPS Virtual Private Server
go to the /etc/httpd/conf/httpd.conf
In the last line add these four lines
Document Root /var/www/virtual/
/var/www/virtual/ create the index file for virtual web server.
Then try in your browser as
Important File
/usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample  to /etc/dhcpd.conf
Document root /var/www/html

No comments:
Write comments