You do not necessarily need a symlink. Most webservers support some form of aliasing to map http:/doc/xxx to /usr/doc/xxx. On Sat, 22 Mar 1997, Jim Pick wrote: > > > On Fri, 21 Mar 1997, Scott K. Ellis wrote: > > > > > Package: info2www > > > Version: 1.2.2.9-4 > > > > > > While the webstandard states that http://localhost/doc/ should resolve to > > > files in the /usr/doc directory, it doesn't provide that there needs to be a > > > symlink in /var/www. The info2www symlink should be to /usr/doc/info2www, > > > not just doc/info2www > > At first, I didn't understand what Scott was try to do. Then I looked at what > info2www tried to do, and it didn't work on my system either - so now I > understand. > > > The problem is that the policy forbids absolute symlinks. That's why I > > can't use `/usr/doc/info2www'. > > Correct. Do the following > > drwxr-xr-x root/root 0 Mar 20 15:46 1997 var/ > drwxr-xr-x root/root 0 Mar 20 15:46 1997 var/www/ > lrwxrwxrwx root/root 0 Mar 20 15:46 1997 var/www/info2www -> > ../../usr/doc/info2www > > Instead of > > drwxr-xr-x root/root 0 Mar 20 15:46 1997 var/ > drwxr-xr-x root/root 0 Mar 20 15:46 1997 var/www/ > lrwxrwxrwx root/root 0 Mar 20 15:46 1997 var/www/info2www -> > doc/info2www > > The problem is, the webservers (even the ones conforming to the web standard) > do not > have a symlink from /var/www/doc to /usr/doc. > > Remember, there are other ways to accomplish having the http://locahost/doc > directory > pointing to /usr/doc without using symlinks - so the web standard doesn't > guarantee > that a symlink between /var/www/doc and /usr/doc will exist. > > Personally, I don't really like the idea of having http://localhost/doc > pointing > at /usr/doc. Most of the stuff there isn't html -- and if you want to look at > that stuff, dwww will work much better (I'm slightly biased). > > > But why is /var/www not guaranteed to exist? > > For dwww, I'm creating it, and I'm also putting in a symlink to the location > of the CGI script (in /usr/lib/dwww/dwww.cgi I think) into > /usr/lib/cgi-bin/dwww and another symlink to /var/lib/dwww/html into the > /var/www (the default document root). > > This is consistant with what Chris is doing with info2www. > > > The Webstandard 3.0 (part of the new policy) says: > > > > ------- > > 3.Web Document Root > > > > Web Applications should try to avoid storing files in the Web > > Document Root. Instead use the /usr/doc/<package> directory for documents > > and register the Web Application via the menu package. If access to the > > web-root is unavoidable then use > > > > /var/www > > > > as the Document Root. This might be just a symlink to the location > > where the sysadmin has put the real document root. > > ------- > > Since dwww uses dynamically created html, it can't put that stuff under > /usr/doc, so it must create a symlink to /var/lib/dwww/html (actually > ../../var/lib/dwww/html for the /var/web directory). In info2www's > case, it might make sense to put that stuff under /usr/doc since it > is all static. > > > It seams to me as all Debian web _servers_ should create ask the user > > where he wants to have the web root and make a symlink to /var/www. > > Huh? The web root should go wherever the user wants it, but it should > default to /var/www. Also, the web server, and other debian web > packages should feel free to create /var/www, /usr/lib/cgi-bin and dump > stuff into them -- since it doesn't create a problem if the user decides > to have their document root elsewhere. > > > They > > should also make a symlink /var/www/doc -> ../../usr/doc or tell the web > > server to map URL's with directory /doc/ to /usr/doc/. > > The symlink idea isn't a part of the web standard. The "mapping" part > is - but if the server does this, then your /var/www/info2www symlink > won't work. > > > Or do I have to use the new menu system? > > No, I think that is more for indexing bona-fide documentation, as opposed to > creating consistent URL's to data files referenced by CGI scripts. > > I hope this helps. > > dwww will miraculously appear in Incoming in a few hours. :-) > > Cheers, > > - Jim > > > > --- +++ --- +++ --- +++ --- +++ --- +++ --- +++ --- +++ --- Please always CC me when replying to posts on mailing lists.
Attachment:
pgpEB9XmIu0Ra.pgp
Description: PGP signature