On Friday 08 October 2004 12:51, Danny Sauer wrote:
Anders wrote regarding 'Re: [SLE] new v9.2 is out' on Wed, Oct 06 at 18:44:
On Thursday, 7 October 2004 01.27, Allen wrote:
One thing I'd like to see, is the same Apache RedHat and Fedora come with. I can set up Apache with those easy on my LAN, and it won't try loading my hostname when the page have running has a link to something in the index.html directory. I'm not sure what it is but RedHat and Fedora are then only two that seem to allow me to set up Apache like that. Slackware and SUSE, my two favs, when I click on Links on my page, it tries loading the hostname.
I'm pretty sure it's the browser that decides how a link is handled, based on what it says in the html
The HTML doesn't have anything to do with it. I've used the same browser to test my pages as I always do, (Links and Galeon), and it works different on RedHat, it's how they have Apache set up.
Well perhaps you could explain what you mean by "loading my hostname" then? As far as I know, there are three types of links, relative, absolute and URL. if you have a relative link (one that doesn't start with a /) the browser will prepend the current URL up to the last / and submit the request. If you have an absolute link (one that starts with a /) then the browser will prepend the current hostname up to the first / and submit the request. And if you have an URL (a link that starts with http:// or other protocol) then the browser won't alter it at all, it will just open it. Maybe I've missed something, but I really don't see where the web server comes into all this.
It's just a guess, but he's probably referring to the hostname set in httpd.conf. It'd be relevent when you go to a URL that's actually a directory, and the server generates a redirect to the index document. Apache can be set to either use the servername/client-provided host header to generate a "real" redirect, or just do the redirect internally (like it does with the ProxyPass directive). If it's doesn't do the redirect internally, or if ServerName is set, then the client can request http://alias/path/ but get redirected to http://realname/path/index.html. The browser will display the new URL in that case, wich will lead to a situation similar to what Allen's describing.
Allen - it'll take some time, but you'll probably benefit from reading up the description of all the stuff Apache can do. Just go to apache.org, click on "HTTP Server", and start reading documentation for the version you prefer to run (which should really be 2.0 unless you *have* to use 1.x). Knowledge is power, and Apache takes lots of power to use effectively.
:)
Heh, I got it now. I used Apache 2 and it worked fine. I don't like reading manuals for server software, it makes me feel weak and un-adventure style. I'm testing t for now, and if it passes I'll put one on my FTP server. which is another server I never read documentation for. ;)