Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-18-2003, 08:13 AM   #1
LQ Newbie
Registered: May 2003
Posts: 8

Rep: Reputation: 0
Apache Related: "http://host/~user" instead of "http://host/~user/" ?

I've been having a trial by fire introduction to Linux (Mandrake 9.1) over the past few days. The good news is, it's starting to makes sense.

I'm currently trying to setup Apache, particularly public_html folders for each of the user profiles.

When I browse "http://host/~username/", the uploaded website loads up with no problems.

However, when I browse "http://host/~username" (ie no trailing slash), I get a 404 error.

I thought it might have something to do with the User Dir init, so i experimented by changing it from:

UserDir public_html public_html


UserDir public_html public_html/

When doing so, the index.html file loads, but all the links and images are broken (they attempt to load from http://host/ as opposed to http://host/username

Any ideas?

Thanks in advance,


Last edited by scrawl; 05-18-2003 at 05:37 PM.
Old 05-18-2003, 10:23 AM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
You probably need to have this turned on in the example below:
# UseCanonicalName:  (new for 1.3)  With this setting turned on, whenever
# Apache needs to construct a self-referencing URL (a URL that refers back
# to the server the response is coming from) it will use ServerName and
# Port to form a "canonical" name.  With this setting off, Apache will
# use the hostname: port that the client supplied, when possible.  This
# also affects SERVER_NAME and SERVER_PORT in CGI scripts.
UseCanonicalName On
Old 05-19-2003, 12:02 AM   #3
LQ Newbie
Registered: May 2003
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks trickykid,

All is now good, much appreciated! Yet another thing to add to the mental note checklist

- Scrawl


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache/Tomcat : jsp = "No Host matches server name" ghow961 Linux - Networking 0 07-01-2004 06:20 PM
Couldn't display "SMB:///" , No host "(Null)" could been Found?????? munkey Linux - Newbie 3 05-03-2004 04:30 PM
Couldn't display "SMB:///" , No host "(Null)" could been Found?????? help munkey Fedora 6 04-30-2004 06:04 PM
"socks5" -> "http" proxy protocol, or ssh tunnel to sock5 ? I'm beyond http p vmicho Linux - Networking 2 12-16-2003 05:32 AM
"host" ok, but "ping" can't find ip address hardigunawan Linux - Networking 2 05-16-2002 05:41 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:45 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration