Apache Virtual host and virtual port

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.