php 在windows下配置虚拟目录的方法介绍
程序员文章站
2022-06-07 20:42:07
先打开apache的conf目录下的httpd.conf文件,在末尾添加如下代码:复制代码 代码如下: serve...
先打开apache的conf目录下的httpd.conf文件,在末尾添加如下代码:
<virtualhost *:80>
servername www.mydemo.com
documentroot "d:/mydemo"
<directory "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
</directory>
</virtualhost>
再到c:->windows->system32->drivers->etc目录,打开hosts文件。
在末尾添加如下代码:
127.0.0.1 www.mydemo.com
然后再创建d:\mydemo目录
再然后重启一下apache服务器。
在浏览器输入www.mydemo.com看看
复制代码 代码如下:
<virtualhost *:80>
servername www.mydemo.com
documentroot "d:/mydemo"
<directory "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
</directory>
</virtualhost>
再到c:->windows->system32->drivers->etc目录,打开hosts文件。
在末尾添加如下代码:
复制代码 代码如下:
127.0.0.1 www.mydemo.com
然后再创建d:\mydemo目录
再然后重启一下apache服务器。
在浏览器输入www.mydemo.com看看
上一篇: 生死参不透短笑话9个
下一篇: 求大神解决一下
推荐阅读
-
利用PHP脚本在Linux下用md5函数加密字符串的方法_php实例
-
Windows7下PHP开发环境安装配置图文方法
-
Linux下ZendOptimizer的安装与配置方法_php技巧
-
windows2000 PHP4在Windows2000下的安装
-
python在windows下创建隐藏窗口子进程的方法
-
请教windows下配置php的memcache的问题
-
在Windows2000ADV下配置Apache+PHP5+MySql5
-
php 在windows下配置虚拟目录的方法,php虚拟目录
-
在Windows系统下使用PHP生成Word文档的教程,
-
有关在Windows下配置PHP Apache Optimizer失败的问题解决方案_PHP