[H-GEN] Apache Question

Andrew Pullin andrew at hotspurbgc.com.au
Wed Aug 6 22:33:56 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Hi All,
    I am doing some CGI developing as part of my Uni course and I wanted to
do some work on my Toshiba Laptop. I have a very nice new RH9.0 install
going with Apache 2.0.42 (I think - 2. something anyhow) up and running.

    My question is about getting Apache to serve web pages and scripts from
my home directory. I could just change to Apache config file to just point
DocumentRoot to the home directories since it is a single user installation,
but I am not happy with that solution as it would break normal operation of
serving pages from the normal directory, and I eventually want to use my new
found knowledge on my home server and so I want to know how can I get Apache
to serve pages in the normal way AND from a home directory.

    At present, I have turned off the security feature that normally
prevents Apache serving home directories and I have set up the appropriate
public_html directory in my home directory. When I try to get a directory
listing through my browser of this directory, using http://mymachine/~user/,
I get an error about not having permissions for this directory, but the
Apache error log says the error is trying to connect to a non-existing
directory, i.e. DocumentRoot - /var/www/html/~user. How do I fix this?

    Can I have multiple DocumentRoot paths running concurrently? If I added
DocumentRoot /home/ then this would probably fix the problem, but wouldn't
this cause a confliction or override the initial DocumentRoot setting? If I
was setting up multiple web sites from the same machine then I would set
DocumentRoot up specifically in the VirtualHosts part of the config, but
surely I shouldn't have to do that?

    Anyhow, what I want is to set Apache up so I can serve the normal web
pages (if any) from http://www.mymachine AND http://mymachine/~user/ . Any
help would be most appreciated.
    Cheers!
        Andrew.


--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list