您好,欢迎访问一九零五行业门户网

php 在windows下配置虚拟目录的步骤

php 在windows下配置虚拟目录的方法
1.先找到apache的配置文件 httpd.conf 找如如下代码:
# virtual hosts
#include conf/extra/httpd-vhosts.conf
把# include conf/extra/httpd-vhosts.conf 去掉#号,如下:
include conf/extra/httpd-vhosts.conf
保存。
2.打开 apache 的 conf 目录下的  extra 文件夹下的  httpd-vhosts.conf 文件,用记事本打开,在末尾加入以下代码:
1 2 servername www.mydemo.com 3 documentroot d:/mydemo 4 5 options followsymlinks includesnoexec indexes 6 directoryindex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml 7 allowoverride options fileinfo 8 order deny,allow 9 allow from all10 11
3.再到c:->windows->system32->drivers->etc目录,打开hosts文件。
在末尾添加如下代码:
 1 127.0.0.1 www.mydemo.com 
然后再创建d:\mydemo目录
再然后重启一下apache服务器。
在浏览器输入www.mydemo.com看看
其它类似信息

推荐信息