I have 3 symfony2 apps, 2 work 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:
<VirtualHost *:80>
DocumentRoot /home/adminuser/webs/servergrove/web
ServerName servergrove.local
ErrorLog /var/log/apache2/servergrove-error.log
CustomLog /var/log/apache2/servergrove-access.log combined
<Directory /home/adminuser/webs/servergrove/web>
AllowOverride All
</Directory>
</VirtualHost>
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 something like this 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?