Virtual web hosts build --- based domain, based on IP, port-based

Here Insert Picture Description
Build a virtual web host

First, based on domain name

1. Configure LAN
Virtual Machine 1

Here Insert Picture Description
Here Insert Picture Description

Virtual Machine 2
Here Insert Picture Description
2. Restart card and view
Virtual Machine 1
Here Insert Picture Description
Virtual Machine 2
Here Insert Picture Description

3. Create a directory, and mount the drive switch to download directory and bind packages
herein described insert pictures
Here Insert Picture Description
Here Insert Picture Description
4. Close the firewall and sandbox
Here Insert Picture Description
5. Edit Main Profile global configuration portion
Here Insert Picture Description
Here Insert Picture Description
6 in the main configuration file editing area profile section
Here Insert Picture Description
Here Insert Picture Description
7. switch to the profile area data storage path
Here Insert Picture Description

8. Copy and renamed
Here Insert Picture Description

9. Forward analyzing and editing abc.com

Here Insert Picture Description
Here Insert Picture Description
10. Forward analyzing and editing 123.com
Here Insert Picture Description
Here Insert Picture Description

11. Switch to a local view and extract package
Here Insert Picture Description
unpack and install into the package
Here Insert Picture Description

12. Specify the installation path, open dynamic load modules, launch the web address, start rewrite function, support Chinese character set to start, start the cgi script support to facilitate the ability to extend application access site
Here Insert Picture Description
Here Insert Picture Description
13. Configure YUM, create a new directory, file transferred to the specified directory and edit the file, install yum
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

Successful installation
14. Specify the installation path, open dynamic load modules, launch the web address, start rewrite function, support Chinese character set to start, start the cgi script support to facilitate the ability to extend application access site

Here Insert Picture Description
Here Insert Picture Description

15. compile and install
Here Insert Picture Description
Here Insert Picture Description

16. Edit virtual host the main configuration file

Here Insert Picture Description
Here Insert Picture Description
17. Create and edit documents and 123 abc
Here Insert Picture Description
edit
Here Insert Picture Description
to change the folder and edit
Here Insert Picture Description
Here Insert Picture Description

18. Create and edit separate profiles

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

19. restart apache service and view

Here Insert Picture Description
Here Insert Picture Description

20.2 DNS configured in the virtual machine
Here Insert Picture Description
21. Turn off the firewall and sandbox in the machine in the service and restart the named service
Here Insert Picture Description
Here Insert Picture Description

And then verify that success in the virtual machine 2

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

Second, based on IP

1. Configure IP hosts on apache
Here Insert Picture Description
2. Modify the separate profile IP

Here Insert Picture Description
Here Insert Picture Description
3. Restart the apache service
Here Insert Picture Description
4. Check verification
Here Insert Picture Description
Here Insert Picture Description

Third, based on the port

1. Modify the IP independent profile

Here Insert Picture Description
Here Insert Picture Description
2. Modify the virtual host configuration file

Here Insert Picture Description
Here Insert Picture Description
3. Restart the apache service
Here Insert Picture Description
shut down apache service
Here Insert Picture Description
open apache Service
Here Insert Picture Description
View

Here Insert Picture Description

4. Verify the client in
Here Insert Picture Description

Released nine original articles · won praise 3 · Views 432

Guess you like

Origin blog.csdn.net/xxx0028/article/details/104413463