127.0.0.1 is working but localhost is not working on mac XAMPP

Posted by Ganim on Server Fault See other posts from Server Fault or by Ganim
Published on 2009-10-20T02:40:54Z Indexed on 2011/01/03 6:55 UTC
Read the original article Hit count: 445

Filed under:
|
|
|

I installed XAMPP on my mac months ago and was working great.

Now i get "Test Page For Apache Installation" when i try to browse /localhost

and /localhost/xampp is not found.

But when i browse /127.0.0.1 it just works as localhost used to be.

I double checked my /etc/hosts file that i have 127.0.0.1 localhost and not commented.

Also when i browse localhost/~username/test.php , i get contents of test.php:

<?php echo 'ganim'; ?>

but if i browse 127.0.0.1/~username/test.php , i get:

ganim

what could change redirecting of localhost or how can i get localhost work again?

© Server Fault or respective owner

Related posts about apache

Related posts about mac