Apache Virtual Host Configuration method

Source: Internet
Author: User

Open httpd.conf File

Get rid of the LoadModule vhost_alias_module modules/mod_vhost_alias.so in front of the #

Get rid of the # # in front of the include conf/extra/httpd-vhosts.conf

Then open the httpd-vhosts.conf file under \conf\extra in the Apache directory, and add the following code

#配置自己的虚拟主机

<virtualhost *:80>

#网站目录, if the PHP directory under the WWW directory, the following #就填写F:/www/php

DocumentRoot "d:/www/php/"

#域名

ServerName www.abc.com

#这里配置欢迎首页面

DirectoryIndex index.html index.htm index.php

<directory/>

Options FollowSymLinks

#不允许别人修改我们的页面

AllowOverride None

#设置访问权限

Order Allow,deny

Allow from all

</Directory>

</VirtualHost>

Change the servername to your own and finally restart Apache.

Apache Virtual Host Configuration method

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.