时时商务社区
标题:
php 在windows下配置虚拟目录的方法介绍
[打印本页]
作者:
网络通达
时间:
2018-2-14 08:16
先打开Apache的conf目录下的httpd.conf文件,在末尾添加如下代码:
[U]复制代码[/U] 代码如下:
ServerName www.mydemo.com
DocumentRoot "D:/mydemo"
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride Options FileInfo
Order Deny,Allow
Allow from all
再到C:->Windows->System32->drivers->etc目录,打开hosts文件。
在末尾添加如下代码:
[U]复制代码[/U] 代码如下:
127.0.0.1 www.mydemo.com
然后再创建D:\mydemo目录
再然后重启一下apache服务器。
在浏览器输入www.mydemo.com看看
您可能感兴趣的文章:
Apache 虚拟目录和默认首页的设置
asp.net Cookie跨域、虚拟目录等设置方法
Serv-U中虚拟目录的设置方法(文字+图文)
Apache 添加虚拟目录注意事项
asp.net 文件路径之获得虚拟目录的网站的根目录
解析在apache里面给php写虚拟目录的详细方法
apache中为php 设置虚拟目录
PHP编程之设置apache虚拟目录
欢迎光临 时时商务社区 (http://bbs.4435.cn/)
Powered by Discuz! X3.2