windows下apache虚似主机配置

jallen81 2009-02-01 09:32:12
我是看《PHP WEB2.0 开发实战》第二章的时候,叫配一个虚似主机,可按书上的配了后,访问页面报错:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@20081220-2236.domain and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
后来又照着http://bbs.91lamp.com/detail-5-1.html上面教的配了,还是报一样的错。怎么回事呀?求高人指教呀?
我的安装路径如下:
Apache d:/AppServ/Apache2.2
PHP d:/AppServ/PHP
MySQL d:/AppServ/MySQL
网站根目录 d:/AppServ/www/
我Apache/conf/extra/httpd-vhosts.conf下的内容如下:
<VirtualHost *:80>
Options None
ServerName phpweb
DocumentRoot "D:\AppServ\Apache2.2\www\htdocs"

<Directory "D:\AppServ\Apache2.2\www\htdocs">
AllowOverride All
Options All
</Directory>

php_value include_path ".;D:\AppServ\Apache2.2\www\include;D:\AppServ\PHP\PEAR"
php_value magic_quotes_gpc off
php_value register_globals off
</VirtualHost>
搞了两天了,都没成功,不知道是怎么回事,请高手指教,最好有看过《PHP WEB2.0 开发实战》这本书并配置成功了的高人来给小弟指教下呀,两天没搞好,晚上睡觉都睡不好。给大家磕头了。我的QQ:2342362
...全文
254 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
jallen81 2009-02-01
  • 打赏
  • 举报
回复
zend是zend framework
Zijian_Zhang 2009-02-01
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 jallen81 的回复:]
根目录写错了,是d:/AppServ/Apache2.2/www
DocumentRoot "D:/AppServ/Apache2.2/www/htdocs" 是因为我的index.php在这个文件夹下,书上是这么说的。我也不明白,还有个问题。书上说把zend解压到include目录下,可我看他的源代码下。include下根本就不有zend文件夹。搞不懂呀。
[/Quote]如果根目录是D:/AppServ/www这个的话,那么DocumentRoot就是这个目录。

把Zend解压到include???你这个Zend是Optimizer还是什么???
jallen81 2009-02-01
  • 打赏
  • 举报
回复
根目录写错了,是d:/AppServ/Apache2.2/www
DocumentRoot "D:/AppServ/Apache2.2/www/htdocs" 是因为我的index.php在这个文件夹下,书上是这么说的。我也不明白,还有个问题。书上说把zend解压到include目录下,可我看他的源代码下。include下根本就不有zend文件夹。搞不懂呀。
Zijian_Zhang 2009-02-01
  • 打赏
  • 举报
回复
[Quote=引用楼主 jallen81 的帖子:]
我是看《PHP WEB2.0 开发实战》第二章的时候,叫配一个虚似主机,可按书上的配了后,访问页面报错:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@20081220-2236.domain and inform them of the time the error occurred, and anything you might have done that may have caused the e…
[/Quote]

你的根目录不是d:/AppServ/www/这个吗,为什么你写D:\AppServ\Apache2.2\www\htdocs,还有,Apache里面的目录分隔符是“/”,而不是“\”。

先应该不需要那么复杂。把那几行代码改为:

[code=INIFile]<VirtualHost *:80>
ServerName phpweb
DocumentRoot "D:/AppServ/www"
</VirtualHost>[/code]

4,250

社区成员

发帖
与我相关
我的任务
社区描述
国内外优秀PHP框架讨论学习
社区管理员
  • Framework
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧