mod_rewrite AGAIN

dtZ

Joined: 2009-10-25
Posts: 6
Posted: Sun, 2009-10-25 01:45

Mod_rewrite is not working on my setup. That is, the urls looks nice all that and it seems to work but the tests in gallery fails. I need to force the test to get it enabled.
I installed gallery(gallery2-2.3) in /usr/local/www, while my docroot is in /www/docroot/antarctica.no. I made a small adjustment in my httpd.conf (Alias /gallery "/usr/local/www/gallery2") - so my gallery installation works fine. When i re-test my mod_rewrite module I see this in apache's error log:
<code>
[Sun Oct 25 01:17:23 2009] [error] [client 192.168.0.28] File does not exist: /www/docroot/antarctica.no/usr, referer: http://antarctica.no/gallery/main.php?g2_view=core.SiteAdmin&g2_subView=rewrite.SetupRewrite
</code>

I wonder my gallery wants to look for the file in my docroot?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Sun, 2009-10-25 08:26
Quote:
I installed gallery(gallery2-2.3) in /usr/local/www, while my docroot is in /www/docroot/antarctica.no.

Why? Why didn't you just install Gallery into your docroot or a sub-directory of that?

I'd first try moving gallery under your docroot:
FAQ: How can I move my gallery installation from one folder to another?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Sun, 2009-10-25 09:01

Out of interest, what is your baseUri directive set to in your config.php file (in the Gallery root directory)?

 
dtZ

Joined: 2009-10-25
Posts: 6
Posted: Sun, 2009-10-25 12:38

Right now its blank. But I've tried setting it to the full URI to the gallery without any luck.

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Sun, 2009-10-25 13:04

Hmm. I was going to suggest it should be blank - I think the 2.3 installer defaults to something else (might be wrong there). When you say Gallery 2-2.3, Are you using Gallery 2.2.3 or Gallery 2.3? If the former, I would ditch it and reinstall 2.3 (or upgrade).

 
dtZ

Joined: 2009-10-25
Posts: 6
Posted: Sun, 2009-10-25 13:08

I have gallery 2.3 ;-)
Will try a reinstall, thanks for the tip.

 
dtZ

Joined: 2009-10-25
Posts: 6
Posted: Sun, 2009-10-25 13:16

hmf, reinstall did not help.

The requested URL /usr/local/www/gallery2/modules/rewrite/data/mod_rewrite/custom/Works.txt was not found on this server.

in apaches error log:
[Sun Oct 25 13:15:43 2009] [error] [client 192.168.0.28] File does not exist: /www/docroot/antarctica.no/usr, referer: http://antarctica.no/gallery/main.php?g2_view=core.SiteAdmin&g2_subView=rewrite.SetupRewrite

in my httpd.conf:
<Directory "/usr/local/www/gallery2">
AllowOverride Options FileInfo
Allow from all
</Directory>

tips anyone?

 
dtZ

Joined: 2009-10-25
Posts: 6
Posted: Sun, 2009-10-25 13:30
Quote:
Why? Why didn't you just install Gallery into your docroot or a sub-directory of that?

I like to keep my webapps away from my docroot. So I can have a directory for all of my webapps.

Quote:
I'd first try moving gallery under your docroot:

Tried that. The tests fail there as well. (but i don't get a 404)

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Sun, 2009-10-25 13:39

There are some mod_rewrite debug suggestions here:
http://www.webmasterworld.com/forum92/5360.htm

Other apache logging may help too.

Quote:
Tried that. The tests fail there as well. (but i don't get a 404)

I would definitely concentrate to get it working under the docroot, first, without needing an extra alias - so it becomes "why doesn't the rewrite module work in my bog-standard setup?" rather than "why doesn't rewrite work in my weird, unusual, setup?". Then you can move it.

 
dtZ

Joined: 2009-10-25
Posts: 6
Posted: Sun, 2009-10-25 14:05

What bugs me is what apaches error log says:

File does not exist: /www/docroot/antarctica.no/usr
Becaus it's not supposed to exist either.