Check permissions configuration

sddroog

Joined: 2005-02-01
Posts: 101
Posted: Wed, 2009-10-28 09:36

When selecting 'Edit Permissions' I always got the error about mod_rewrite and AllowOverwrite. I knew that my system was configured correctly, so I investigated why this error occurred. It turned out that it is because my server cannot resolve its own hostname.

If I add the website name to the hostfile (/etc/hosts) everything works fine. Why doesn't the system use localhost?

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9289
Posted: Wed, 2009-10-28 19:58

huh? Works just fine on my servers, 1 server I setup myself with several installs of G3 and G2 and 1 server at a shared host with G3 installed under 3 different domains there. I've not had to add entries to /etc/hosts and I know for a fact my shared host only has 1 entry in /etc/hosts (as I just looked) and that's for the localhost.

My guess from your description is that something isn't setup correctly.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
sddroog

Joined: 2005-02-01
Posts: 101
Posted: Wed, 2009-10-28 20:33

I assume that all those installs of G2 and G3 are somehow defined in a DNS or other system so the server knows how to resolve the website name to itself. Otherwise it can not work. I searched some more and another user (danjoh) had the same issue I did, here: http://gallery.menalto.com/node/88167#comment-310481

The function htaccess_works() in access.php calls remote::do_request and that can only work if the 'remote' system can be found. If the system doesn't know how to resolve the hostname it fails.

You might call that a setup error. For testing websites I do that all the time, no need to define a DNS entry for a website that is not in production. I just declare it in my desktop's local hostfile.

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9289
Posted: Wed, 2009-10-28 20:40

Yes, all my sites are public facing and have public URLs defined in DNS.

I guess you'll need to create entries in /etc/hosts or build sites under a valid domain, like www.example.com/newsite or create sub-domains newsite.example.com
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments