Configuring a virtual Host in PHP

Source: Internet
Author: User
Tags web hosting

Enable httpd-vhosts.conf in the httpd.conf file
is to write off the #
# virtual hosts, web hosting
Include conf/extra/httpd-vhosts.conf


Suppose our virtual host is on the F:/myweb disk [the site, beforehand]
Setting up the http-vhosts.conf file
#配置我们自己的虚拟主机
<VirtualHost127.0.0.1:80>
DocumentRoot "D:/myblog"
#这里配置欢迎首页面
DirectoryIndex index.html index.htmindex.php
<directory/>
Options FollowSymLinks
#不许可别人修改我们的页面
AllowOverride None
#设置访问权限
Order Allow,deny
Allow from all
</Directory>
</VirtualHost>
4. Add our IP and host mapping relationships in the Hosts file

C:/windows/system32/drivers/etc/hosts

127.0.0.1 www.sohu.cn
Ask you to master:
1. Through the case you need to clearly access a page (html/php) detailed process
2. Ability to configure virtual hosts

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.