Working App installed on new server routing no longer works

Hi All,

I’m having a bit of a problem with an application I’ve developed with Yii.

I developed it on a Windows box using WAMPserver where it runs without any problems. I have also installed the application on a shared server and that also works fine.

However, I have just installed the app on a Debian VPS server which I spent the afternoon setting up. The VPS has Apache 2, MySQL, and PHP 5 installed, and I can access a web page by using the IP address as the name servers haven’t been redirected yet. When calling phpinfo on a test php page, I also get the correct results.

However, the Yii application I’ve installed does not seem to want to work. With just the IP address in the address bar, I see the correct page content, but when I try to go to another page, for example /admin all I get is a URL not found error.

It appears that the routing is simply not working.

I should also note that ./yiic migrate when run returns successfully.

Does anyone have any idea what might be happening here?

Okay. I’ve solved the problem.

After dicking around for a while with the Yii app, I decided to install Wordpress in a subdirectory. As with the app, the install went well and Wordpress came up. But when I changed the permalink structure, I wasn’t able to navigate to a dynamic page without a not found error.

It turns out that when I set up the server, I had left the default site enabled under the sites-enabled directory. I had created the correct site in that directory, but there were settings in the default that caused problems.

A quick ‘sudo a2dissite default’ and ‘sudo /etc/init.d/apache2 reload’ and everything was working; Wordpress and the Yii app both!

Time for a happy dance!

Anyway, I hope this helps anyone who has encountered a similar problem running their Yii site on a VPS.

Cheers