The virtual machine has an IP address based on the Apache service @ 3IP visit

1. First we have to use nmtui command to add multiple IP addresses (192.168.24.101/102/103) for the network card

 

 

 

 

 

 

 

 

 

 Restart systemctl restart network card

And each URL and IP ping the show I have here a success

 

 2. respectively, in / home / wwwroot Create a data directory website

 mkdir -p /home/wwwroot/101

mkdir -p /home/wwwroot/102

mkdir -p /home/wwwroot/103

Home files are written in the data directory three sites, the content for the IP address of the site:

echo "IP:192.168.10.101" > /home/wwwroot/10/index.html

 echo "IP:192.168.10.102" > /home/wwwroot/20/index.htm

echo "IP:192.168.10.103" > /home/wwwroot/30/index.html

 

 3. then enters httpd configuration file, with reference to FIG style configuration at three

vim /etc /httpd/conf/httpd.conf

 

 

 

 4. Open the browser and enter the IP address you can go

 

 

 

 

 

 End!

 

Guess you like

Origin www.cnblogs.com/li2019/p/11782192.html