Previous 1 2 3 4 5 Next 66 Replies Latest reply: Nov 15, 2011 12:54 PM by hphoeksma Go to original post
  • Seemingly Absent Level 1 Level 1 (10 points)

    it's easiest from the command line - bring up a terminal and copy/paste this into it


    sudo echo NameVirtualHost\ \*:80 > /etc/apache2/sites/00000_MoreTestingRequired.conf


    I did read the manual....but it is useless, at the end of the day, it is still apache under the covers so I just read the config files.

  • Tim Bloom1 Level 1 Level 1 (110 points)

    You, sir, are a lifesaver.

  • Jupeman Level 1 Level 1 (40 points)

    This is very helpful as I'm basically a rookie at all this.  Of course, I receive a "permission denied" when I enter the full command you gave.  That's a bad sign when utilizing the "sudo" command, no?

  • Yannick Rose Level 1 Level 1 (55 points)

    Wow, glad to see that someone found a solution!


    i will try that later today!




  • matuzalem Level 1 Level 1 (5 points)

    And if you have SSL enabled the solution is


    sudo echo NameVirtualHost\ \*:443 > /etc/apache2/sites/00000_MoreTestingRequired.conf


    instead of


    sudo echo NameVirtualHost\ \*:80 > /etc/apache2/sites/00000_MoreTestingRequired.conf

  • matuzalem Level 1 Level 1 (5 points)

    issue a "sudo su",

    type your password

    then run the command


    echo NameVirtualHost\ \*:80 > /etc/apache2/sites/00000_MoreTestingRequired.conf


    or if you have SSL enabled run


    echo NameVirtualHost\ \*:443 > /etc/apache2/sites/00000_MoreTestingRequired.conf



  • Yannick Rose Level 1 Level 1 (55 points)

    i followed your step and it worked!




    now the only things that don't work is trying to go to:


    i have sites that use MySQL and i would like to import them with postgre

  • Ikyo Level 1 Level 1 (5 points)

    If you also change it from Any IP to the one bound to the interface on the server it will work too.  On a side note, anyone able to get the site to work with both HTTP and HTTPS?

  • sbkeith Level 1 Level 1 (50 points)

    Guys, it's alot easier than this.






    Any where in the MAIN server configuration area (and for you techies out there) prefereably in the websharing portion find the area that resembles:



         blah blah

    </IF DEFINE>



    just add this line on a new line in between the <IF DEFINE> </IF DEFINE> brackets:


    NameVirtualHost *:80 (for non-SSL) (<--- don't add the parens)

    NameVirtualHost *:443 (for SSL)  (<--- don't add the parens)


    That's it.


    Then all of your virtual hosts should work.  There is no need to add the *** MoreTestingRequired line.

  • sbkeith Level 1 Level 1 (50 points)

    Sorry for the double post...


    Message was edited by: sbkeith

  • Seemingly Absent Level 1 Level 1 (10 points)

    @sbkeith - the reason for breaking it out into a seperate file is to ensure that it doesn't get overwritten by the config tools, or whenever Apple releases a patch that blows away the 300+ line httpd.conf file.


    The individual site configuration files are picked up by an include statement at the bottom of the httpd.conf file, so as long as the file placed in the sites directory begins with a string of five zeros then it will be read before the individual VirtualHost statements that relate to each virtual host.

  • sbkeith Level 1 Level 1 (50 points)

    Yes, I agree with you.


    Wasn't bashing your response and if it appeared that way, I humbly apologize.


    I always add this edit to the default.conf files to avoid such overwriting and thus far, have been successful.


    SysAdmin preference I concede.


    Also - a housekeeping note:  Delete all the (IF DEFINE !MAC OSXSERVER> entries and comments (they are in the default .conf file anyway) and it won't be 300+ lines. A OS X Server will never be anything other than an OS X Server so these lines are pointless.

  • Charles Conway Level 1 Level 1 (50 points)

    Alright, I've tried the suggestions here along with a lot of other things but I'm not getting this to work.  Am I alone, or are there others for whom this doesn't work?


    No matter what subdomain I go to (which have different document roots), I always get the "Welcome to Mac OSX Lion" page.  Even a virtual-host that's set as a reverse proxy just continues to go to the welcome screen.


    I've tried adding as a sites/ file named as suggested, also placing it in the httpd.conf.


    Even adding new websites via doesn't appear to do anything.


    This was an upgrade from an existing SLS installation.

  • Jupeman Level 1 Level 1 (40 points)

    I have not been able to get it to work, either.  Same issue, similar situation (upgrade from SLS).

  • matuzalem Level 1 Level 1 (5 points)

    Dive into the "sites" folder and make sure your changes haven't been placed into a conf.prev file. likes to "clean" that directory.


    If your sites are https:// Open "" go to the "Hardware" section click on "settings" Check that the sites have a SSL profile.


    After much trial and error I think I have finally fixed it.