Symfony2 URLs 404 in apache2 after rebuild of VM
We have the following system:
runs on Ubuntu LTS 12.04
served by apache2 2.2.22
Jenkins builds project at least once a day
Vagrant & Puppet are used to create the runtime environment from scratch every time
The problem: Suddenly the Symfony URLs were not served anymore.
While curl localhost:8081/app_dev.php worked like a charm (of course it yielded an error message from Symfony, but it was Symfony that answered), all real symfony URLs stopped working:
vagrant@precise64:~$ curl localhost:8081/app_dev.php/_test/data/class/clean
The requested URL /app_dev.php/_test/data/class/clean was not found on this server.
Apache/2.2.22 (Ubuntu) Server at localhost Port 8081
Usually, Apache should give that url to app_dev.php and be done with it; app.php URLs behaved exactly the same way.
Neither Apache config, vhosts nor .htaccess did change between working and failed runs. Symfony routing was unchanged as well.
What could have gone wrong?
For some reason,
libapache2-mod-php5filter was installed instead of
libapache2-mod-php during puppet provisioning. We did not explicitly state in our manifest that
libapache2-mod-php5 should be installed, instead it was installed as dependency of
libapache2-mod-php5filter is the same module as
libapache2-mod-php5, just that it is supporting filters:
Unless you specifically need filter-module support, you most likely should instead install libapache2-mod-php5.
The two packages are mutually exclusive (at least in debian/ubuntu)
I am not sure how that package came to be installed instead of
libapache2-mod-php5, but an install of
libapache2-mod-php5 solved the problem (as that automatically uninstalled
We put that package install into our puppet files, and the problem is gone.
- Database Administration Tutorials
- Programming Tutorials & IT News
- Linux & DevOps World
- Ebook Reviews
- PES Matches, Skills & News