httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] Problems accessing aliases with Apache
Date Wed, 04 Sep 2002 08:05:44 GMT
301 is not an error - it means "Moved Permanently" and is usually accompanied by the URL to
which the resource has moved. In the context of UserDir, it usually arises when your request
does not end with a trailing slash. Does it work if you do http://servername/~username/ ?

I assume that UserDir is set correctly, i.e., if you have "UserDir /user/web" then your home
web directory is at /usr/web/username... Check the docs for this directive and verify your
setup is correct. 

Otherwise, it could be that your ServerName directive is faulty - this is the name which apache
uses to form the redirect URL and so it has to be something that the remote machine can resolve.
If in doubt, comment it out and apache will use the raw IP address in the redirect.

Also, check your UseCanonicalName directive - if set to "on", apache will make up the redirect
URL from ServerName and Port for the VH. If set to "off", it will just use the Host supplied
by the client - without knowing how DNS works in your local network, I can't advise which
is appropriate for you. Read the docs and tune it to suit your setup.

By the way, is it that your server is listening to localhost AND a network IP? (N.B. if you
haven't used any Listen directive, the default is for apache to listen to port 80 on ALL active
interfaces). If none of this is helpful, perhaps try to recast your question (I found the
original quite hard to understand...). Describe:

- what you type into the browser exactly
- what you expect to get exactly 
- what you actually get exactly (i.e. error code, message - don't say "it doesn't work" :-)
- Any other exepcted/actual examples which you think might illuminate things...


Owen Boyle

>-----Original Message-----
>From: Curt Crandall []
>Sent: Mittwoch, 4. September 2002 05:54
>Subject: [users@httpd] Problems accessing aliases with Apache
>I have a very strange problem that I've been
>struggling with.  I have enabled Apache on my iMac. 
>Using the default httpd.conf, I tried to get to my
>~username/ link by typing my IP/~username/ into the
>URL box.
>On the server, the URL turns into:
>If I try the URL from a remote machine, I get a 301
>error in access_log.
>I can get to the default page (i.e. index.html.en in
>the document root) and the /manual/ alias by typing
>the URL into the URL text field of the browser.  I can
>also access my other aliases and ~username/ if I put a
>link to it on the default page.  However, any alias
>I've defined will generate the 301 error if I try to
>access the specific URL from a remote machine.
>This makes no sense to me, so I was hoping someone
>here has run into this problem before and may have
>some helpful advise.
>I'm running an iMac G4-800 with OSX 10.1.5 and Apache
>Do You Yahoo!?
>Yahoo! Finance - Get real-time stock quotes
>The official User-To-User support forum of the Apache HTTP 
>Server Project.
>See <URL:> for more info.
>To unsubscribe, e-mail:
>   "   from the digest:
>For additional commands, e-mail:

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message