Koozali.org: home of the SME Server

~ user web space

Kirk Ferguson

~ user web space
« on: January 17, 2003, 02:43:15 AM »
Hello.  I have a strange issue:  I have installed the rpm to add personal web space in a users /home/public_html directory.   After I add a new user, I can go to my.domain/~username and access their page without problems.  If I go to my.domain/username, I get 404 not found, as expected.

Here's the strange part:  If a wait until the next day, I can access the users page at my.domain/username OR my.domain/~username.  Any ideas what is happening to cause this change?  I've attached a snippet from the httpd/access_log:

===================
Last night:

[15/Jan/2003:18:19:04 -0700] "GET /~test/ HTTP/1.1" 200 0 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020408"

[15/Jan/2003:18:18:56 -0700] "GET /test/ HTTP/1.1" 404 213 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020408"

And in the error log:

[Wed Jan 15 18:18:56 2003] [error] [client 10.10.64.69] File does not exist: /home/e-smith/files/primary/html/test/

And today:

 [16/Jan/2003:11:52:09 -0700] "GET /test HTTP/1.1" 301 249 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130"

 [16/Jan/2003:11:52:09 -0700] "GET /test/ HTTP/1.1" 200 0 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130"

Damien Curtain

Re: ~ user web space
« Reply #1 on: January 17, 2003, 03:15:25 AM »
Kirk Ferguson wrote:
>
> Hello.  I have a strange issue:  I have installed the rpm to
> add personal web space in a users /home/public_html
> directory.   After I add a new user, I can go to
> my.domain/~username and access their page without problems.
> If I go to my.domain/username, I get 404 not found, as
> expected.
>
> Here's the strange part:  If a wait until the next day, I can
> access the users page at my.domain/username OR
> my.domain/~username.  Any ideas what is happening to cause
> this change?  I've attached a snippet from the
> httpd/access_log:

Because for it to be available as domain/username it requires an alias in httpd.conf, whereas domain/~username is a generic directive.

You could add the actions to reconfigure apache and reload it in the new user create event, or manually run an event that truggers these actions, or wait.
--
 Damien

Damien Curtain

Re: ~ user web space
« Reply #2 on: January 17, 2003, 03:21:05 AM »
Damien Curtain wrote:
>
> Kirk Ferguson wrote:
> >
> > Hello.  I have a strange issue:  I have installed the rpm to
> > add personal web space in a users /home/public_html
> > directory.   After I add a new user, I can go to
> > my.domain/~username and access their page without problems.
> > If I go to my.domain/username, I get 404 not found, as
> > expected.
> >
> > Here's the strange part:  If a wait until the next day, I can
> > access the users page at my.domain/username OR
> > my.domain/~username.  Any ideas what is happening to cause
> > this change?  I've attached a snippet from the
> > httpd/access_log:
>
> Because for it to be available as domain/username it requires
> an alias in httpd.conf, whereas domain/~username is a generic
> directive.
>
> You could add the actions to reconfigure apache and reload it
> in the new user create event, or manually run an event that
> truggers these actions, or wait.

If you don't want domain/username edit /etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50userdir

and remove the section:
        $result .= "#-------------------------------------------------------\n";
        $result .= "# Alias to enable /user aswell as /~user access\n";
        $result .= "#-------------------------------------------------------\n";
        while (($key,$value) = each %accounts)
        {
            my ($type, %properties) = split (/\|/, $value, -1);
            if ($type eq 'user')
            {
                $result .= "Alias /$key /home/e-smith/files/users/$key/home/publ
ic_html\n";
            }
        }

        $result .= "\n";

--
 Damien

Kirk Ferguson

Re: ~ user web space
« Reply #3 on: January 17, 2003, 05:02:31 AM »
Thanks!  I guess if I'd read more carefully it would help.  I'm still not quite clear what does trigger Apache to be reconfigured when the system is unattended overnight.  Do I need to expand the template and restart Apache after I add a user's web space?  

Kirk