문제

Thanks for any help you can provide!

We just migrated our website to a new server. It's on a Joyent Cloud running Sun/Oracle Solaris, and it has Ruby in addition to PHP. It runs on MySQL and Apache.

Before, we had things set up so that when I navigated to "example.com/community", my browser would find "example.com/community/index.html" and then meta refresh-redirect me appropriately to "example.com/communityboard"

Now, when I navigate to "example.com/community", I get a "file not found" error. However, if I navigate to "example.com/community/index.html", the site works as intended.

I think this is a problem in Apache, but I'm not 100% sure. Is there a way to fix this issue? Step-by-step advice would be much appreciated!

도움이 되었습니까?

해결책 2

Here's what happened according to my developer. I don't fully understand the explanation, so I'm not sure I can answer follow-up questions! "With the old mongrel cluster, Apache would recognize "/community" as a directory, silently forward to "/community/", which would then pick up the forwarding index.html file. With Phusion Passenger," which I guess we're using now, "Apache sends the request directly to Passenger if "/community" is not a regular file, and Passenger was returning the 404 error. As a fix, we've disabled passenger in the community folder, which fixes the problem."

다른 팁

In your site config (ex. /etc/apache2/sites-available/example.com) you'll need to make sure you have a DirectoryIndex directive. Your config should look something like:

<VirtualHost xx.xxx.xxx.xx>
    ServerName example.com
    DocumentRoot /path/to/webroot
    DirectoryIndex index.html
</VirtualHost>

Then just make sure you do a '/etc/init.d/apache2 restart' and you should be good go.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top