Problems with index module routing in symfony

I was working on simple symfony website consisting of just one application and one module. Naturally, I wasn’t too creative and choose ‘frontend’ as application name and ‘index’ for module name. When I started to test it on production, it wasn’t working at all except default action. It was giving me 404 error.
After spending some time debugging and logging symfony and mod_rewrite I’ve found out the problem. Rewrite rule was sending me to /index.php/actionname instead of index.php/index/actionname.
The problem was in apache option MultiViews, as soon as I removed it everything started to work as expected. This option tells webserver to search for foo/filename.* if foo/filename wasn’t found.
I had this option enabled in my default virtual host config in my apache distribution and I had never paid any attention to it before.

Wednesday, November 26th, 2008

403 error after installing Mongrel with Apache2

If you’ve installed Mongrel for your Rails application with Apache2 as a proxy and receive 403-Forbidden error, first look in apache error log. If you have something like

[warn] proxy: No protocol handler was valid for the URL. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.

you probably forgot to enable/load all required modules. Make sure you have proxy, proxy_balancer and proxy_http.

Tuesday, November 13th, 2007