[okfn-help] apache config rewrite issue

Rufus Pollock rufus.pollock at okfn.org
Fri Feb 2 11:21:22 GMT 2007


Jo Walsh wrote:
> hey all,
> 
> So this file:
>  okfn at knowledgeforge:~/svn-okfn/trunk/etc/apache2/okfn.org.extra
> 
> Contains this rewrite:
>  RewriteCond %{REQUEST_URI} !^/files/.*$
>  RewriteEngine  on
>  RewriteRule    ^(.*)\.html$  $1/  [R]
> 
> That's breaking non-moin-generated pages.

Spot-on Jo -- I found your fix already in there (and working) when I 
went to look at this this morning. My apologies for this breakage which 
I introduced with an overgreedy rewrite rule. Provides yet another 
example of why I need to extend and improve:

<http://okfn.org/sysadmin/svn/sandbox/okfn_migrate/verify_okfn_site.py>

> I changed it to 
>  RewriteCond %{REQUEST_URI} !^/(files|geo)/.*$
> 
> But this is a shit fix, and furthermore didn't go the whole hog and

I think the fix is fine -- or am i missing something ...

> restart Apache because i was reluctant to break the world by futzing
> with this:
> 
>  okfn at knowledgeforge:~/svn-okfn/trunk/etc/apache2$ /usr/sbin/apache2ctl graceful
>  Syntax error on line 4 of /etc/apache2/mods-enabled/fastcgi.conf:
>  FastCgiIpcDir /var/lib/apache2/fastcgi: access for server (uid 1002, gid 1002) failed: write not allowed

Don't think this is a 'real' error but arises from not doing a sudo 
though I'm not sure. I always use:

/etc/init.d/apache2 restart/reload

and that is definitely working fine.

> I would be happy enough to have a geo.okfn.org and redirect
> okfn.org/geo so we dont have to slow apache down with more regexen.

Whatever you'd prefer (another alternative is just to move the geo stuff 
inside the main okfn.org moinmoin cms (now that the theme is better ...).

Regards,

Rufus

PS: i think the performance issues have been sorted -- I'll be mailing 
the list about all of this soon.



More information about the okfn-help mailing list