Q: Lion Server and Virtual Hosts
I think most people are aware that with 10.7 Apple inexplicably killed Web Service administration within Server Admin, and put it into the new Server application. That would be great if they didn't severely cripple the formerly-available features, and also make it a roll of the dice whether command-line changes are recognized/preserved.
WIth 10.7.2 they improved the virtual host problem, but there are still problems. I had an issue adding port 443 (https) web sites. They would simply not work. However, if you re-selected the certificate, the server script would apply it through all the 443 sites, which would then work. However, I found that the script also switched ALL my sites to port 443. I had to go through and change them all with the Server app. The good news is they all worked then.
Even after the 10.7.2 update, I still had some difficulty getting the sites to work. I decided to set the web service back to default using the following command which will restore the factory defaults:
sudo /System/Library/PrivateFrameworks/ServerFoundation.framework/Resources/xswebcon fig restorefactorysettings
I would recomend if you are having problems getting your virtual hosts working, try the following sequence:
- Add all your port 443 sites.
- Re-select the certificate.
- Add all your port 80 sites.
- Make any changes, such as logfile destinations, in /etc/apache2/sites/<0000...your site.conf>
- Stop and start the web service from the Server app.
Posted on Oct 16, 2011 1:14 PM