繁体   English   中英

设置Zend框架时禁止Wamp 403

[英]Wamp 403 forbidden, when setting up zend framework

我实际上正在尝试在WAMP上安装zend框架。 我按照本教程中的说明进行操作。 我遇到了一个问题。 我在目录C:\\ websites \\ test中设置Zend Framework。 我按照教程中的说明编辑了文件C:\\ wampzend \\ bin \\ apache \\ apache2.4.9 \\ conf \\ extra \\ httpd-vhosts.conf:

<Directory c:/websites>
    Options Indexes FollowSymLinks
    DirectoryIndex index.php
    AllowOverride All
    Order Deny,Allow
    Allow from all
</Directory>
<VirtualHost *:80>
    DocumentRoot "C:/wampzend/www"
    ServerName localhost
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/websites/test/public"
    ServerName test
    SetEnv APPLICATION_ENV "development"
</VirtualHost>

我还编辑了主机文件,并输入了一个从test指向127.0.0.1的指针。 如果我进行url测试,则会收到403禁止响应。 指向wampzend / www的localhost工作正常。 403响应有什么解决方案吗?

尝试执行此操作,目录访问权限的分配实际上属于...定义内,并且应特定于该VHOST。

<VirtualHost *:80>
    DocumentRoot "C:/wampzend/www"
    ServerName localhost
    <Directory "c:/wampzend/www">
        AllowOverride All
        Order Deny,Allow
        Deny from all
        Allow from 127.0.0.1 localhost ::1
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/websites/test/public"
    ServerName test
    SetEnv APPLICATION_ENV "development"
    <Directory "c:/websites/test/public">
        Options Indexes FollowSymLinks
        DirectoryIndex index.php
        AllowOverride All
        Order Deny,Allow
        Deny from all
        Allow from 127.0.0.1 localhost ::1
    </Directory>
</VirtualHost>

绝对使用“ Allow from all绝对是致命的,尤其是在您只是在开发而不是访问世界的时候。 除非您移植路由器,否则它实际上不会提供访问世界的权限,但是当您尝试这样做时,最好的方法是只有您真正希望对世界可见的站点。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM