Apache Virtual Directory
1. Create a file ending with Conf in the HTTPD sub-configuration directory and add the configuration information
2. Modify httpd master configuration file vim/etc/httpd/conf/httpd.conf
3, create a virtual directory, and put in a home page
4. Restart the httpd service, turn off the firewall
5. Access on Win, virtual directory
6. Set access permissions modify the configuration file for the virtual directory vim vdir.conf, restart service
7, create a httpd user, cut home directory put in/etc/httpd/user, test
Apache Virtual Host
Experiment: Build two or more websites with the same IP
1, configure DNS, modify the httpd master configuration file
2, in the HTTPD sub-configuration directory to create a conf end of the file, and add configuration information,
3. Create a virtual directory site and add a home page
4, restart the service, shut down the firewall, in the win test
Apache Virtual Port
Experiment: Different ports for the same domain name to access different Web pages
1, configure DNS, modify the httpd master configuration file
2. Create a file ending with Conf in the HTTPD sub-configuration directory and add the configuration information
3, add the port in httpd master configuration, create the corresponding directory, add the homepage
4, restart the service, shut down the firewall, in the win test www.benet.com www.benet.com:8080
Apache Virtual host and virtual port