Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I used to be able to type 127.0.0.1 (or my network IP 10.10.53.32) and it would resolve to my "default" virtual host. 127.0.0.1/~Shanimal and shanimal.dev both resolve to their appropriate folders. localhost and 127.0.0.1 give me a 404 - "Not Found The requested URL / was not found on this server."

Basically, my "It works!" screen no longer works.

/private/etc/apache2/Shanimal.conf:

<Directory "/Users/Shanimal/Sites/_www">
    Options Indexes Multiviews
    AllowOverride AuthConfig Limit
    Order allow,deny
    Allow from all
</Directory>

hosts:

127.0.0.1 localhost
127.0.0.1 shanimal.dev
share|improve this question
    
Does entering your public IP address still work as before? –  Daniel Beck Oct 22 '12 at 16:27
    
What's the log output in /var/log/apache2/error_log? Access via Console.app or Terminal. –  Daniel Beck Oct 22 '12 at 16:29
    
It's a 404 as well. –  Shanimal Oct 22 '12 at 16:30
    
nothing seems to be appended there. i did a tail - f /var/log/apache2/error_log –  Shanimal Oct 22 '12 at 16:32
1  
Skip the space: tail -f /var/log/apache2/error_log. So, no output like [Mon Oct 22 18:28:40 2012] [error] [client fe80::1] File does not exist: /Library/WebServer/Documents/foo? –  Daniel Beck Oct 22 '12 at 16:34

1 Answer 1

up vote 1 down vote accepted

I removed the reference to the two dummy vhost examples in /private/etc/apache2/extra/httpd-vhosts.conf* and this pretty much did the trick for me. Daniel put me on the right track by telling me where the logs were located (+1)

I had originally created the special user.conf file while following these instructions.

Since I don't care about the /~Shanimal user folder, I removed /private/etc/apache2/Shanimal.conf and pointed the DocumentRoot to a symlink "_www" in my Sites folder.

DocumentRoot "/Users/Shanimal/Sites/_www"
<Directory "/Users/Shanimal/Sites/_www">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

This configuration actually works with the dummy vhost entries removed (pointing to a wrong but valid place) so I suppose the dummy vhost entries were the problem. All is working as expected now.

share|improve this answer
    
Google searched, found this and it helped me again. a new machine with a fresh install Mtn Lion... Thanks Shanimal! –  Shanimal Sep 5 '13 at 2:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.