HTTP from Home folders

Katsu Tanda yellowdog-general@lists.terrasoftsolutions.com
Sat Nov 22 21:44:03 2003


Well I got it to work and I should have looked at the
config file more closly cause it was all there. 
However I seem to have a problem. When i link to to a
file, for example a picture img.jpg, it links to my
domain rather than the user folder.

home/user/public_html/index.html
home/user/public_html/img.jpg

so I have the code img src="/img.jpg"
it links that to mydomain.com/img.jpg rather than the
one in the user folder. So i have to link it like
src="/~user/img.jpg" to get it to work right. I don't
really want my users to have to link like that cause
its kinda inconveinent.

By the way, thanks for the quick reply
Katsu

oh, i use the default config,
UserDir public_html

maybe i should do
UserDir /home/*/public_html
?

--- Stefan Bruda <bruda@ubishops.ca> wrote:
> 
> Hi.
> 
> At 10:17 -0800 on 2003-11-22 Katsu Tanda wrote:
>  >
>  > I am wonder how I can set apache to allow
> webpages
>  > from my users homefolders in the fashion
>  > http://mydomain.com/~user linking to
> /home/user/html.
> 
> I have in my /etc/httpd/conf/commonhttpd.conf the
> following entry:
> 
> #
> # UserDir: The name of the directory which is
> appended onto a user's home
> # directory if a ~user request is received.
> #
> <IfModule mod_userdir.c>
>     UserDir /home/httpd/html/home/*
> </IfModule>
> 
> I prefer to have all the Web pages in /home/httpd
> hence the above
> settings.  If your user home directories reside in
> /home and you want
> for example to have a subdirectory public_html in
> each user's home to
> hold their web pages, then I believe you could write
> instead
> 
> <IfModule mod_userdir.c>
>     UserDir /home/*/public_html
> </IfModule>
> 
> or just
> 
> <IfModule mod_userdir.c>
>     UserDir public_html
> </IfModule>
> 
> Also see
> http://httpd.apache.org/docs/mod/mod_userdir.html
> 
> Hope this helps,
> Stefan
> 
> -- 
> If it was so, it might be; and if it were so, it
> would be; but as
> it isn't, it ain't. That's logic.
>     --Lewis Carroll, Through the Looking-Glass
> _______________________________________________
> yellowdog-general mailing list
> yellowdog-general@lists.terrasoftsolutions.com
> http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/