Practice----FQDN-based virtual host settings

Source: Internet
Author: User

1. vim/etc/httpd/conf.d/vhost1.conf Create the Vhost1.conf file and enter the following content

<virtualhost 192.168.1.28:80>
ServerName www1.magedu.com
Documentroot/data/vhosts/www1

Customlog Logs/www1-access_log combined

</VirtualHost>
2. vim/etc/httpd/conf.d/vhost2.conf Create the Vhost2.conf file and enter the following content

<virtualhost 192.168.1.28:80>
ServerName www1.magedu.com
Documentroot/data/vhosts/www1

Customlog Logs/www2-access_log combined

</VirtualHost>

Using HTTPD-T to detect syntax with or without errors

3. Another machine edit etc/hosts file

Settings: 192.168.1.28 www1.magedu.com www2.magedu.com


4. Browse in another machine

Curl www1.magedu.com

Curl www1.magedu.com


5, native view/var/log/httpd/under the log file is generated


Practice----FQDN-based virtual host settings

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.