duanpu8830 2016-02-03 12:50
浏览 124

找不到Symfony错误404工具栏和子目录

After searching on Stackoverflow about this question, I read about different possible solutions and different references to different links. I am not a pro at working with Symfony, in fact, I am a total beginner and I am not really well aware of which file saves what kind of data etc. So to ask my question: What should I do in order for my Symfony application to work fine?

I used Vagrant to SSH into my virtual Ubuntu system and this is an error log I found that actually keeps an error, however it is from january, meaning that this log does not log the error I am still experiencing. Does anyone know which error log I should look for so I can share it here and help you out identifying my problem by doing so?

[01:39 PM]-[vagrant@local]-[/var/log/nginx] B
B$ dir
_.access.log    _.error.log.1                     nxv_6hujsloyp5ug.error.log
access.log      error.log.1                       nxv_6hujsloyp5ug.error.log.1
_.access.log.1  nxv_6hujsloyp5ug.access.log       project_access.log
_.error.log     nxv_6hujsloyp5ug.access.log.1     project_access.log.1
error.log       nxv_6hujsloyp5ug.access.log.2.gz  project_error.log

[01:40 PM]-[vagrant@local]-[/var/log/nginx] B
B$ tail -1 nxv_6hujsloyp5ug.error.log.1
2016/01/29 13:58:06 [error] 16933#0: *40 rewrite or internal redirection cycle while internally redirecting to "/index.php", client: 192.168.56.1, server: barry.dev, request: "GET /my_project_name/web/app_dev.php/ HTTP/1.1", host: "www.awesome.dev"

[01:40 PM]-[vagrant@local]-[/var/log/nginx] B
B$

I also read that a possible solution is editing the .htacces file, however I have no clue which one that should be then. I have seen one in the web directory, edited it and nothing happened, same goes for src directory and app directory.

Another possible solution is to set AcceptPathInfo "On". But then again I do not know where to find such, should be the virtual host accodring to one of the answers on this page.

And for those wondering, as you can see in the error log, I am using Nginx.

my_project_name/web/app_dev.php returns the toolbar error.

my_project_name/web/app_dev.php/controllername returns 404.

Edit: By making a new virtual machine and repeating the whole Symfony installation process and using Apache instead of Nginx somehow fixed the problem for me.

  • 写回答

1条回答 默认 最新

  • duanpoqiu0919 2016-02-03 13:14
    关注

    You will need to edit the .htaccess file in the web directory. All files that are accessible through a browser are stored in the web directory. The other .htaccess files are merely a 'defence in depth' strategy that prevents directories being accidentally exposed.

    This page covers the basic setup for Symfony2 with Apache2: http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html

    评论

报告相同问题?

悬赏问题

  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥15 可见光定位matlab仿真