Previous 1 2 3 4 5 Next 66 Replies Latest reply: Nov 15, 2011 12:54 PM by hphoeksma Go to original post
  • Charles Conway Level 1 Level 1

    No, I've gone so far now as to disable all of the sites/ .conf files and try hard-coding the virtual host descriptions into the httpd.conf file and still no dice.


    One interesting thing:  With everything removed the log errors show it is looking for files in /var/empty, as you would expect.  If I add in a very short, simple virtualhost for *:80 then I can specify a new DocumentRoot and it works as expected.  But, if I add another virtualhost for my real hostname with a different document root, it continues to use the settings (and document root) of the *:80 vhost.  If I remove the *:80 virtualhost it falls back to /var/empty.


    That indicates to me that the virtualhost directives are being read, but somehow the hostname is being mangled such that the only vhost directive that will match it is *.   Does anyone know how to print out the hostname that apache thinks it is operating under?

  • scott937 Level 1 Level 1

    Off topic, was Lion Server tested at all? Any releases of it to develpeors berforehand? First time Apple has disapointed me. Too many errors to be tolerated.

  • StephenCCH Level 1 Level 1

    I do know it was tested by the developer community but I don't think Apple was taking the feedback really seriously. From all I am reading, I'm starting to believe it was an after thought to Apple. They don't even have a PDF of the Advanced Server Administration guide available, just a web version. I think this goes with the $50 price tag.

  • CaLiFoRNiAWEBER Level 1 Level 1



    NameVirtualHost *:80


    to the top of the httpd.conf located in \etc\apache2\


    restart apache


    You can then host multiple websites and use the server app to manage them.

  • Jupeman Level 1 Level 1

    Any idea why adding NameVirtuaHost *:80 doesn't work for me?  I had multiple websites that I hosted under SLS and can't get them to work here.  Same DNS settings, etc.  I add this line and it still doesn't redirect to my other sites.


    The only thing that seems odd is when I type in the domain name for the alternate site, it appears as a red dot and does not turn into a green dot.  What is that red/green dot testing?  The fact that it is still red may be an indicator of what?

  • CaLiFoRNiAWEBER Level 1 Level 1


  • CaLiFoRNiAWEBER Level 1 Level 1

    terminal  --- >  use pico



  • Jupeman Level 1 Level 1

    My sites are port 80, so your original line should work.  A problem is that the I lose the line I enter into httpd.conf when I restart apache.  I'm restarting by turning off and back on the web service through Server app.  Is this incorrect?

  • CaLiFoRNiAWEBER Level 1 Level 1

    Make sure you are adding it to the top very top --->


    Should look like this...


    NameVirtualHost *:80


    # Mac OS ... .......


    Turn off web. (wait until it completes).. turn on web..  - should work and should be able to add additonal sites

  • Jupeman Level 1 Level 1

    OK!  This time it worked.  The main difference is that I left a space between the NameVirtualHost line and the hash mark.  Why that made a difference on the file being saved or changed, I don't know.


    One other major thing I did was to move my website to the boot disc.  I think I have an issue with how Server app is writing the path name to the website files I had stored on a difference disk.  At one point along the way, I changed the name of that disc in the OS, but to the server, it appears to still have the old name.  Where is the path for sites written out in the configuration?


    Note that my users are on the non-boot disc, too, and the Server references their location fine...

  • Jupeman Level 1 Level 1

    Doh, this worked for a bit (30 minutes?) and it stopped working because the changes I made to the httpd.conf file were over-written.  How do I stop that from happening?

  • Charles Conway Level 1 Level 1

    I wish I could help.  If you look above you'll see I'm having the same issue.  Coming from SLS and correctly applying the suggestions here still doesn't work.

  • Charles Conway Level 1 Level 1

    From what I can tell, your best bet is to completely avoid the "Web" panel.  Any changes will whole-sale overwrite all the apache config files.  Also, unlike previously, it appears that turning web services "Off" doesn't actually mean off.  Because Apple depends on the web-server for new web-based config tools (e.g. Profile Manager) the On/Off switch just engages a different set of config rules that ignore all of the non-system websites.


    To be sure you completely cycle apache I'd suggest "sudo apachectl restart" from the terminal.

  • NeoNet Tim Level 1 Level 1

    If you use the hint marked as the correct answer on the first page of this discussion, you shouldn't have your settings overwritten by, and you're still able to add sites through It's worked great for me so far

  • iHatePC Level 2 Level 2

    Stupid newbie question. Is "NameVirtualHost" supposed to be replaced with each domain that I am hosting?


    Example: *:80 *:80 *:80