Path problem accessing server from anywhere except localhost

Path problem accessing server from anywhere except localhost

Post by Joshua Sliv » Mon, 26 Apr 1999 04:00:00




> I'm trying to host a website Apache on RedHat 5.2. To connect to the
> internet, I dial an ISP which gives my a dynamic ip address. I also have a
> dynamic dns service which updates a regular name to resolve to my dynamic ip.
> I don't know if my problem is with this or just a config error, but here it
> is:
> When I connect to my server from localhost, the index.html page comes up
> fine, and I can go anywhere in my site. But when I try to access my computer
> through the internet (i.e., from a different computer), I can only get the
> index.html. If I try to go past that, the browser tries to use paths such as
> "/home/httpd/html...", like it was trying to view it locally. How do I make
> Apache just use relative paths? (Like if I'm looking at "index.html", I want
> the remote computer to hit a link to "page1.html", not
> "/home/httpd/html/page1.html". I believe it may have something to do with my
> ServerName directive in httpd.conf, but I'm not sure.

Look in the html pages.  Do they have full "filesystem" paths?  They
shouldn't.  They should have relative paths, or absolute paths
starting at the DocumentRoot.  This is really an html coding problem,
not a server problem.

--
Joshua Slive

http://finance.commerce.ubc.ca/~slive/