Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I updated from 10.8.1 to 10.8.2 last week and since then I have yet to get certain vhosts working on my local sandbox. Some of them work fine while others just don't work at all now when they did previously. Is there anything I can do to get those working again?

Working Vhost:

<VirtualHost *:80>
    DocumentRoot "/Users/reindeerdev/Sites/patron-social-club-v2-old/app/webroot"
    ServerName pscv2.local
    ErrorLog "/private/var/log/apache2/pscv2-error_log"
    CustomLog "/private/var/log/apache2/pscv2-access_log" common
    <Directory /Users/reindeerdev/Sites/patron-social-club-v2-old/app/webroot>
        Options All
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

Problematic Vhost:

<VirtualHost *:80>
    DocumentRoot "/Users/reindeerdev/Sites/Patron_Intranet/app/webroot"
    ServerName intranet.local
    ErrorLog "/private/var/log/apache2/intranet-error_log"
    CustomLog "/private/var/log/apache2/intranet-access_log" common
    <Directory /Users/reindeerdev/Sites/Patron_Intranet/app/webroot>
        Options All
        AllowOverride All
    </Directory>
</VirtualHost>

Finally saw something in my Apache configs:

[Tue Oct 16 10:52:03 2012] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
httpd: Could not reliably determine the server's fully qualified domain name, using Logans-iMac.local for ServerName
[Tue Oct 16 10:52:06 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
[Tue Oct 16 10:52:09 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Oct 16 10:52:09 2012] [notice] Digest: done
[Tue Oct 16 10:52:09 2012] [notice] Apache/2.2.22 (Unix) PHP/5.3.15 with Suhosin-Patch DAV/2 mod_ssl/2.2.22 OpenSSL/0.9.8r mod_perl/2.0.5 Perl/v5.12.4 configured -- resuming normal operations

I know for a fact that I have Include /etc/apache2/other/httpd-vhosts.conf in my httpd.conf file and that I have confirmed that that is the correct vhosts file that I'm using.

share|improve this question
    
Do you have a NameVirtualHost *:80 in your httpd-vhosts.conf? –  Gerry Oct 16 '12 at 15:23
    
Yes I do. When I do apachectl -S I also get the correct output and Syntax OK –  Logan Best Oct 16 '12 at 16:33
add comment

2 Answers

Determined there was a very odd user permissions change on the ~/Sites folder that was causing these errors. Fixed.

share|improve this answer
1  
Glad you got this fixed. Could you include the specifics about exactly what the error was, and what you did to fix it? Also, make sure to mark your own answer as "accepted", so that others with similar problems can know what you did. Thanks! –  soxman Nov 21 '12 at 4:17
add comment

You seem to have not put an "Allow" directive in the problematic vhost. Possibly you previously changed the global restrictions in /etc/apache2/httpd.conf to be more relaxed, and it got overridden during the update. The default is Allow none. It is not a good idea to do that on a global scale though, as it may give the webserver access to the full filesystem.

To correct the issue, change the vhost to:

<VirtualHost *:80>
    DocumentRoot "/Users/reindeerdev/Sites/Patron_Intranet/app/webroot"
    ServerName intranet.local
    ErrorLog "/private/var/log/apache2/intranet-error_log"
    CustomLog "/private/var/log/apache2/intranet-access_log" common
    <Directory /Users/reindeerdev/Sites/Patron_Intranet/app/webroot>
        Options All
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
share|improve this answer
    
I made that change and still nothing. Should I post my httpd.conf? –  Logan Best Oct 15 '12 at 16:04
    
What is the actual error you are getting when browsing to the site? Did you restart Apache after the changes? –  Gerry Oct 15 '12 at 16:23
    
Yes I restarted. All I get is the standard: Unable to connect. Firefox can't establish a connection to the server at intranet.local. –  Logan Best Oct 15 '12 at 16:26
    
How are you resolving these hostnames? Via /etc/hosts? Have you checked there and if it still resolves correctly? –  Gerry Oct 15 '12 at 16:29
1  
yea via /etc/hosts. When I ping intranet.local, it pings 127.0.0.1 successfully. just won't pull up the webapp. –  Logan Best Oct 15 '12 at 17:29
show 3 more comments

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.