Thread: apache redirects to 127.0.0.1
05-08-2007, 04:58 AM #1
apache redirects to 127.0.0.1
- Member Since
- May 04, 2007
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"
Connecting to 126.96.36.199:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://127.0.0.1/~pagod/test/ [following]
Connecting to 127.0.0.1:80... failed: Connection refused.
using the IP instead of the server name doesn't make things better, i.e. accessing http://188.8.131.52/~pagod/test (my current IP) doesn't work, but accessing http://184.108.40.206/~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!!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By oxband in forum OS X - Operating SystemReplies: 5Last Post: 06-19-2013, 04:30 PM
By Arbo in forum Switcher HangoutReplies: 7Last Post: 05-28-2012, 10:30 PM
By Rozzomono30 in forum Apple NotebooksReplies: 2Last Post: 05-17-2012, 09:55 AM
By apollochristian in forum Apple NotebooksReplies: 10Last Post: 03-04-2011, 06:46 PM
By vja4Him in forum Running Windows (or anything else) on your MacReplies: 3Last Post: 04-04-2008, 12:05 AM