After upgrading to Lion, all my virtualhosts stopped working. They redirect to "It works" main apache page on my device for some weird reason.


/etc/hosts: myhost.com

<VirtualHost *:80>
    DocumentRoot "/Library/WebServer/Documents/testproj/"
    ServerName myhost.com

    <Directory "/Library/WebServer/Documents/testproj/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all

    ErrorLog "/private/var/log/apache2/testproj-error_log"
    CustomLog "/private/var/log/apache2/testproj-access_log" common

Did anyone else face the same issue? How can I fix this?

  • Might be worth cross-posting to apple.stackexchange.com – Alex Apr 1 '12 at 18:22
  • Is this snippet part of httpd.conf? Or is it in a separate file? If the latter, are you certain that the appropriate Include directives are still in place? – larsks Apr 1 '12 at 23:45
  • @larsks Yes i am pretty sure the include directive is in place.. – Maverick Apr 2 '12 at 9:09
  • @alex Why, its obviously a server question, not some generic, "why isn't iDevice X connecting with iMusicNoteOnBlueCircle?" question. – Hawken Apr 22 '12 at 19:04
  • The virtual host you are providing would be the same as the default (port 80); which virtual host isn't working? – Hawken Apr 22 '12 at 19:06

Seems like two apache's were working together. the homebew one and the macport one... removing macport apache fixed the issue... seems like i was modifying the apache config that wasn't the one working on port 80

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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