Build a domain name-based Virtual Host
Install DNS
Modify the DNS master configuration file vim/var/named/chroot/etc/named. conf
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0533464318-0.jpg "title =" 1.jpg" alt = "172953642.jpg"/>
Create the benet.com. zone region file and the accp.com. zone region file.
Vim/var/chroot/named/var/named/benet.com. zone
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/05334A639-1.jpg "title =" 2.jpg" alt = "1730092.16.jpg"/>
# Cp/var/named/chroot/var/named/benet.com. zone/var/named/chroot/var/named/accp.com. zone
Install httpd
1. Extract
A. Tar zxvf httpd-2.2.9.tar.gz-C/usr/src
B) Cd/user/src/httpd-2.2.9
2. Configure compilation options
A)./configure -- prefix =/usr/local/httpd -- enable-so -- enable-rewrite -- enable-charset-lite
-- Enable-cgi
B)--enble-so: function of loading dynamic modules
C)-enble-rewrite web page Function
3. Compile and install the server program
A) Make & makeinstall
Optimized execution path
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/05334625U-2.jpg "style =" float: none; "title =" 3.jpg" alt = "173028271.jpg"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0533461U2-3.jpg "style =" float: none; "title =" 4.jpg" alt = "173028387.jpg"/>
Add httpd System Service
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/05334B512-4.jpg "style =" float: none; "title =" 5.jpg" alt = "173049819.jpg"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0533461612-5.jpg "style =" float: none; "title =" 6.jpg" alt = "173049166.jpg"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/05334A2R-6.jpg "style =" float: none; "title =" 7.jpg" alt = "173049555.jpg"/>
1.Create webpage files for two virtual sites
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/05334C263-7.jpg "title =" 8.jpg" alt = "173112525.jpg"/>
2. Modify the httpd. conf file and add the virtual host configuration.
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/05334A3A-8.jpg "title =" 9.jpg" alt = "173132760.jpg"/>
3. Enter the VM configuration file and modify the VM configuration file.
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0533461B2-9.jpg "title =" 10.jpg" alt = "173147612.jpg"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0533463236-10.jpg "title =" 11.jpg" alt = "173159652.jpg"/>
5. Restart the httpd service.
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0533462616-11.jpg "title =" 12.jpg" alt = "173215592.jpg"/>
Restrict Access Control of client addresses
Write Control for this region in the <Directory> Directory area of the httpd. conf file
1. Order allow, deny first allowed and then refused
2. Order deny, allow deny first and then allow
A) For example:
I. Order allow, deny
Allow from all Allow all
Order deny, allow
Deny from benet.com.cn
Deny from 192.168.1.1 does not allow access from users in the benet.com.cn domain and 192.168.1.1