Security Symfony安全注销404正在生产中
正如标题所说,我在2.8版上遇到了Symfony注销系统的问题 我跟踪了开发环境的it工作。但在制作过程中,我得到了一个极好的结果: 找不到 在此服务器上找不到请求的URL/注销 以下是安全配置:Security Symfony安全注销404正在生产中,security,symfony,symfony-security,Security,Symfony,Symfony Security,正如标题所说,我在2.8版上遇到了Symfony注销系统的问题 我跟踪了开发环境的it工作。但在制作过程中,我得到了一个极好的结果: 找不到 在此服务器上找不到请求的URL/注销 以下是安全配置: security: role_hierarchy: ROLE_VISITEUR: ['ROLE_TEST_VISITEUR'] ROLE_REDACTEUR: ['ROLE_VISITEUR', 'ROLE_TEST_REDACTEUR']
security:
role_hierarchy:
ROLE_VISITEUR: ['ROLE_TEST_VISITEUR']
ROLE_REDACTEUR: ['ROLE_VISITEUR', 'ROLE_TEST_REDACTEUR']
ROLE_VALIDATEUR_MODIFICATION: ['ROLE_VISITEUR', 'ROLE_TEST_VALIDATEUR_MODIFICATION']
ROLE_ADMIN: ['ROLE_REDACTEUR', 'ROLE_VALIDATEUR_MODIFICATION']
# http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
providers:
fos_userbundle:
id: fos_user.user_provider.username
firewalls:
# disables authentication for assets and the profiler, adapt it according to your needs
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
pattern: ^/
logout:
path: /logout
target: /
remember_me:
secret: '%secret%'
lifetime: 60*60*10
always_remember_me: true
guard:
authenticators:
- app.sso_authenticator
# activate different ways to authenticate
# http_basic: ~
# http://symfony.com/doc/current/book/security.html#a-configuring-how-your-users-will-authenticate
# form_login: ~
# http://symfony.com/doc/current/cookbook/security/form_login_setup.html
以及routing.yml:
logout:
path: /logout
我清空了dev和prod上的缓存,但什么也没发生。
debug:router命令很好地显示了注销路由。
日志是空的,因为这是404错误
谢谢你的帮助。我只是好奇,我不确定这是否有效,但试试看。不要使用那些注销设置,而是使用:
firewalls:
main:
...
logout: true
所以只需将其设置为“true”,看看会发生什么。只是好奇,我不确定这是否有效,但请尝试一下。不要使用那些注销设置,而是使用:
firewalls:
main:
...
logout: true
所以只要将它设置为“true”,看看会发生什么。如果找到它
问题来自Apache2.4中的mod_rewrite.c,我的vhost自一年以来一直保持不变,需要使用新的完整建议进行更新:
如果找到了
问题来自Apache2.4中的mod_rewrite.c,我的vhost自一年以来一直保持不变,需要使用新的完整建议进行更新:
感谢您的回答,问题与Apache上的vhost配置有关。感谢您的回答,问题与Apache上的vhost配置有关。