【问题标题】:Zend Skeleton Apache failed to restartZend Skeleton Apache 重启失败
【发布时间】:2014-03-19 00:12:44
【问题描述】:

我正在按照官方网站上的指南:http://framework.zend.com/manual/2.0/en/user-guide/skeleton-application.html 开始使用 Zend Skeleton 应用程序。

输入作曲家命令后:

php composer.phar self-update 
php composer.phar install

并设置虚拟主机,然后进入“重新启动您的网络服务器”步骤。 Apache 无法重新启动,并且在查看 Apache2 文件夹中的错误日志时:

[Tue Feb 18 23:38:50 2014] [error] [client 127.0.0.1] File does not exist: E:/Dev Soft/Zend/Apache2/htdocs/whmsg.js, referer: http://zf2-skeleton/
[Tue Feb 18 23:38:50 2014] [error] [client 127.0.0.1] File does not exist: E:/Dev Soft/Zend/Apache2/htdocs/whtopic.js, referer: http://zf2-skeleton/
[Tue Feb 18 23:38:50 2014] [error] [client 127.0.0.1] File does not exist: E:/Dev Soft/Zend/Apache2/htdocs/whutils.js, referer: http://zf2-skeleton/
[Tue Feb 18 23:38:50 2014] [error] [client 127.0.0.1] File does not exist: E:/Dev Soft/Zend/Apache2/htdocs/whproxy.js, referer: http://zf2-skeleton/
[Tue Feb 18 23:38:51 2014] [error] [client 127.0.0.1] File does not exist: E:/Dev Soft/Zend/Apache2/htdocs/whutils.js, referer: http://zf2-skeleton/
[Tue Feb 18 23:38:51 2014] [error] [client 127.0.0.1] File does not exist: E:/Dev Soft/Zend/Apache2/htdocs/whlang.js, referer: http://zf2-skeleton/
[Tue Feb 18 23:38:51 2014] [error] [client 127.0.0.1] File does not exist: E:/Dev Soft/Zend/Apache2/htdocs/whtopic.js, referer: http://zf2-skeleton/
[Tue Feb 18 23:40:53 2014] [notice] Parent: Received restart signal -- Restarting the server.
[Tue Feb 18 23:40:53 2014] [notice] Child 5908: Exit event signaled. Child process is ending.
Syntax error on line 3 of E:/Dev Soft/Zend/ZendServer/etc/sites.d/vhost_zf2-skeleton.conf:
DocumentRoot takes one argument, Root directory of the document tree
[Tue Feb 18 23:40:54 2014] [notice] Child 5908: Released the start mutex
[Tue Feb 18 23:40:54 2014] [notice] Child 5908: All worker threads have exited.
[Tue Feb 18 23:40:55 2014] [notice] Child 5908: Child process is exiting

这一堆丢失的文件是什么? 我错过了什么?

vhost_zf2-skeleton.conf:

<VirtualHost *:80>
ServerName zf2-skeleton
DocumentRoot E:/Dev Soft/ZF2-Skeleton/public
SetEnv APPLICATION_ENV "development"
<Directory E:/Dev Soft/ZF2-Skeleton/public>
    DirectoryIndex index.php
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

【问题讨论】:

    标签: php apache zend-framework2


    【解决方案1】:

    因为您使用的是 Windows,所以我认为您需要在路径周围加上引号:

    DocumentRoot "E:/Dev Soft/ZF2-Skeleton/public"
    

    您可能还需要使用转义的反斜杠而不是正斜杠:

    DocumentRoot "E:\\Dev Soft\\ZF2-Skeleton\\public"
    

    【讨论】:

    • 谢谢,现在可以使用了。没想到这么简单。
    猜你喜欢
    • 1970-01-01
    • 2012-08-06
    • 1970-01-01
    • 2013-04-18
    • 1970-01-01
    • 2022-06-17
    • 2016-12-12
    • 2014-10-12
    • 2015-07-22
    相关资源
    最近更新 更多