错误的路由或wamp错误?

问题描述 投票:1回答:1

我刚开始一个新的symfony项目,但是我的wamp出了问题,我不知道这是来自Wamp,vhost还是Symfony。

我希望你能帮助我。

当我想测试我的虚拟主机时,使用网址kingdom/我得到了这个错误403:

您无权访问此服务器上的/。在80号王国的Apache / 2.4.23(Win32)PHP / 5.6.25服务器

我的hhtpd-vhost.com包含

# Virtual Hosts
#

<VirtualHost *:80>
    ServerName localhost
    ServerAlias localhost
    DocumentRoot c:/wamp/www
    <Directory  "c:/wamp/www/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName kingdom
    ServerAlias kingdom
    DocumentRoot c:/wamp/www/Kingdom
    <Directory "c:/wamp/www/Kingdom/">
        Options -Indexes
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
#

在我的主机文件中,我得到了这个

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost
127.0.0.1           kingdom
#

现在,在我的app / config / routing.yml上

user:
resource: "@UserBundle/Resources/config/routing.yml"
prefix:   /user

wos_way_of_shogun:
resource: "@WOSWayOfShogunBundle/Resources/config/routing.yml"
prefix:   /

在我的WOSWayOfShogunBundle / config / routing.yml上

wos_way_of_shogun_homepage:
path:     /
defaults:  
    _controller: WOSWayOfShogunBundle:Default:index 

wos_way_of_shogun_homepage_bis:
path:     /accueil
defaults:  
    _controller: WOSWayOfShogunBundle:Default:index 

无论哪种方式,我仍然得到kingdom/的403错误和kingdom/app_dev.php/accueil的404错误

谢谢你的帮助,如果你能看到我在这里缺少的东西......一定很简单但是:(

symfony wampserver vhosts
1个回答
1
投票

为c:/ wamp / www / Kingdom / web更改c:/ wamp / www / Kingdom

# Virtual Hosts
#

<VirtualHost *:80>
    ServerName localhost
    ServerAlias localhost
    DocumentRoot c:/wamp/www
    <Directory  "c:/wamp/www/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName kingdom
    ServerAlias kingdom
    DocumentRoot c:/wamp/www/Kingdom/web
    <Directory "c:/wamp/www/Kingdom/web">
        Options -Indexes
        Order allow,deny
        Allow from all
        AllowOverride All
    </Directory>
</VirtualHost>
#
© www.soinside.com 2019 - 2024. All rights reserved.