Re: SkunkWeb + Apache + "Sub" Root?
Jacob Smullyan <[email protected]>
| Newsgroups | gmane.comp.web.skunkweb |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Jan 04, 2004 at 11:49:46PM -0800, Dan Chow wrote: > > Hi, > > My co-worker is having problems signing up onto the skunkweb mailing list > so I am forwarding this question on his behalf: > > Date: Fri, 2 Jan 2004 20:15:14 -0800 (PST) > From: Matthew Bogosian <[email protected]> > To: [email protected] > Subject: SkunkWeb + Apache + "Sub" Root? > > > I've been looking for an answer for this, and I didn't find anything in > the FAQ or the mailing list archives, so I apologize in advance if this > question has already been answered. > > I've recently set up SkunkWeb with Apache via mod_skunkweb according to > the default installation outlined in > SkunkWeb/mod_skunkweb/httpd_conf.stub (having mod_skunkweb as the > default/root handler and then identifying the exceptions like cgi-bin) > and everything works great. > > However, if I try to have SkunkWeb serve only a sub-directory, I get > stuck. Here's what I have in my Apache config file: > > ... > > > <Location /skunk/> > SetHandler skunkweb-handler > </Location> > > ... > > Now when I go to http://localhost/skunk/ I get the error "Sorry the > requested document is not available". If I create the directory and file > /usr/local/skunk/docroot/skunk/index.html then when I go to the > aforementioned URL, the new document is shown. > > This isn't quite what I wanted. I wanted SkunkWeb's root to show up > under http://localhost/skunk/ when served by Apache. I even tried > removing my newly-created skunk/ directory and creating a simlink: > > $ cd /usr/local/skunk/docroot && ln -s . skunk > > However when I went to http://localhost/skunk/ after that, I just got a > blank page (well technically, it contained > "<html><body></body></html>"). > > Is there a way to make SkunkWeb display it's root under > http://localhost/skunk/ when using mod_skunkweb with apache (other than > just copying everything from /usr/local/skunk/docroot to > /usr/local/skunk/docroot/skunk)? > > My guess is that this would have to involve telling SkunkWeb what its > new root was (so it might have the chance to accurately construct any > URLs it might have to). The problem is that the uri being passed to SkunkWeb is /skunk/, not /. mod_skunkweb doesn't itself rewrite the uri depending on the top-level directory where it is set as handler; you have to do it yourself. It may be possible to use Apache's mod_rewrite without changing handlers, but I'm not sure. You can definitely use SkunkWeb's rewrite service. To do this, add "rewrite" to your list of services and define "rewriteRules" in sw.conf like so: rewriteRules=[(r'^/skunk/(.*)$', r'/\1')] Hope that helps! Jacob Smullyan
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/+WoyuqamFyFXXLIRArbXAJ9mdrrkPePQjsPjQ+4BnBlFYXxSnQCfbkb4 dVujBFGwA3DSMiZqRBGD7p8= =nwIL -----END PGP SIGNATURE-----