Saturday, 28 September 2013

Error 404 on Symfony2

Error 404 on Symfony2

I have 3 symfony2 apps, 2 wors fine, but the third just works for the
default page. The rest of the routes throw a 404 error. Environment is:
Ubunto 12.04 VirtualBox, apache 2, php 5.3.10, Mongobd.
This is de VHost content: DocumentRoot
/home/adminuser/webs/servergrove/web ServerName servergrove.local ErrorLog
/var/log/apache2/servergrove-error.log CustomLog
/var/log/apache2/servergrove-access.log combined AllowOverride All
This is the routing.yml:
homepage: pattern: / defaults: { _controller:
SGLiveChatBundle:Default:index }
sglc_chat_homepage: pattern: /sglivechat defaults: { _controller:
SGLiveChatBundle:Chat:index }
sglc_chat_invite: pattern: /sglivechat/{sessId}/invite defaults: {
_controller: SGLiveChatBundle:Chat:invite }
... and so on.
The following url works fine: http://servergrove.local/
The following (and any other) doesn't: http://servergrove.local/sglivechat
Not Found The requested URL /sglivechat was not found on this server.
Apache/2.2.22 (Ubuntu) Server at servergrove.local Port 80
I have very little experience with symfony. I'd think is related with
rewrite engine, but the other two projects works ok.
I've got the following on the command line:
adminuser@adminuser-VirtualBox-073n:~/webs/servergrove$ php app/console
router:debug [router] Current routes Name Method Pattern homepage ANY /
sglc_admin_index GET /admin/sglivechat prueba ANY /prueba
adminuser@adminuser-VirtualBox-073n:~/webs/servergrove$ php app/console
router:dump-apache RewriteCond %{PATH_INFO} ^/$ RewriteRule .* app.php
[QSA,L,E=ROUTING_route:homepage,E=ROUTING_controller:ServerGrove\SGLiveChatBundle\Controller\DefaultController::indexAction]
RewriteCond %{REQUEST_METHOD} ^(get) [NC] RewriteCond %{PATH_INFO}
^/admin/sglivechat$ RewriteRule .* app.php
[QSA,L,E=ROUTING_route:sglc_admin_index,E=ROUTING_controller:ServerGrove\SGLiveChatBundle\Controller\AdminController::indexAction]
RewriteCond %{PATH_INFO} ^/prueba$ RewriteRule .* app.php
[QSA,L,E=ROUTING_route:prueba,E=ROUTING_controller:ServerGrove\SGLiveChatBundle\Controller\DefaultController::pruebaAction]
Any idea of what can be wrong?

No comments:

Post a Comment