"Apache" Configuration virtual host, new Pro test (domain-based)

Source: Internet
Author: User

1 httpd.conf

Open ithttpd.confSearch for Characters "# Virtual hosts, remove the comment from the following line as follows. The aim is to makeApacheLoad after reboothttpd-vhosts.confFile. 2 Openconf/extra/httpd-vhosts.confNamevirtualhost *:80//enable domain-based virtual hosts, if not, only the first oneVirtualHostThe configuration item will take effect. <virtualhost *:80> ServerAdmin[email protected]. com/webmaster mailbox.
DocumentRoot "D:/apache2.2/docs/ok"//Virtual host project directory. ServerName ok.com//host name.
Serveralias www.ok.com//host alias.
Errorlog "Logs/ok.com-error.log"//Virtual host error log.
Customlog "Logs/ok.com-access.log" common//virtual host access log.
</VirtualHost> 3 error correction if 404 or not Found errors occur, you can checkVirtual Host project directoryis incorrect. If the above error occurs, the virtual host project directory can be repaired.

Apache configuration Virtual host, new Pro test (domain-based)

Related Article

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.