apache redirects to 127.0.0.1

Joined
May 4, 2007
Messages
3
Reaction score
1
Points
3
Hi all,

i'm having a problem with my web server, perhaps someone can help. i can remember having the same problem on an OS X 10.2, and somehow solving it, but i have no clue how i did that (it was more than 1 year ago...)

so basically here's the problem: i have my apache running on my mac at home. i use my DSL router to update my DNS entry, and that works fine. i can access pages, or ssh to my server, that's ok.
the problem arises when i try to access *directories* on the mac. in such cases, where apache would either try to display a dir index or search for index.html, it simply redirects the call to 127.0.0.1, and of course it doesn't work...

here are a few examples:
http://pagod.dyndns.org/ -> redirect to http://pagod.dyndns.org/index.html (fine)
http://pagod.dyndns.org/~pagod/ -> redirect to http://pagod.dyndns.org/~pagod/index.html (fine)
http://pagod.dyndns.org/~pagod (no slash at the end) -> redirect to http://127.0.0.1/~pagod/ NOT FINE!!!
http://pagod.dyndns.org/~pagod/test/ -> redirect to http://pagod.dyndns.org/test/index.html (seems to be fine)
http://pagod.dyndns.org/~pagod/test (no slash at the end!) -> redirect to http://127.0.0.1/~pagod/test/ NOT FINE!!!
http://pagod.dyndns.org/~pagod/test/index.html -> displays index.html (fine)

when i try to get the last-but-one with wget, i get the following message:
-------------------
pingoo temp/test> wget "http://pagod.dyndns.org/~pagod/test"
--10:18:41-- http://84.153.124.233/~pagod/test
=> `test'
Connecting to 84.153.124.233:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://127.0.0.1/~pagod/test/ [following]
--10:18:41-- http://127.0.0.1/~pagod/test/
=> `index.html'
Connecting to 127.0.0.1:80... failed: Connection refused.
pingo temp/test>
-------------------

using the IP instead of the server name doesn't make things better, i.e. accessing http://84.153.124.233/~pagod/test (my current IP) doesn't work, but accessing http://84.153.124.233/~pagod/test/ (with slash at the end) does work.

finally, once an index has been successfully loaded (e.g. by adding the slash at the end of the address), further attempts to load it (without slash) will work as well in the same session (e.g. browser window). might have been cached on the server side?..

anyone already experienced this problem, and/or knows how to solve it? i guess it's a config problem, but i'm rather new to apache and i don't feel too comfortable playing around with httpd.conf yet...

thx a lot in advance!!

Pagod
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top