Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two mac mini lion servers setup to run as production and staging machines. My sysadmin decided on these machines over the previous CentOS we had because it had an "interface" to be able to manage it, rather than just the terminal. To be honest, I prefer the terminal.

My problem is, the mac osx 10.7 server.app seems to be having issues with the creation of virtual hosts in the 'Web' section. It seems VERY touchy. For example, I cannot create a http virtual host first. I have to create a https host first with a unique dns name 9e..g vuly6), then create the http host with a different dns name to the first (e.g. www), or it appears to override it the first one, even though one is ssl and one is non-ssl.

Further, it seems to override perfectly good configurations at random. For example, the default sites directory is usually /Users/default/Sites/Customsites or something, but sometimes when I load the server.app it changes to /var/empty. Also, if I change or add extra virtual hosts after the first one or two, it starts to mess up and the first two virtual hosts start having issues.

Has anyone had any experience with setting up virtual hosts via this app? Am I able to manually create these virtual hosts, without using the app, and without the app overriding my settings when I restart apache?

share|improve this question
2  
Fire your admin, he is not qualified. –  SvW Oct 28 '12 at 1:30
    
Haha, he can do everything by terminal, but he prefers the interface and so does the general manager, because he wants to be able to do stuff if we're not there rolleyes. Ridiculous. But seriously, can i just uncomment Include extra/httpd-virtualhosts.conf or whatever and it won't override it? –  Benno Oct 28 '12 at 1:44
    
Sorry, can't say - I stopped using OS X Server after 10.6, as the newer versions are only terrible jokes not even worth the few dollars Apple charge for them these days. But even with the old and discontinued Server Admin tool it was always kind of tricky to get the web server module to do what you want, therefore I never extensively used it. –  SvW Oct 28 '12 at 2:00

1 Answer 1

up vote 0 down vote accepted

In answer to my own question,

Yes, you can create your own virtual hosts manually using extra/httpd-vhosts.conf. I read through the entire ruby script that server app uses to generate virtual hosts.

To create your own manually, you need to uncomment the Include in httpd.conf and httpd.conf.default. When the Server.app has a hissy fit and decides to reset all your configuration, it will reset the httpd.conf file to the default file as well.

Then just modify httpd-vhosts.conf and you'll be sweet.

share|improve this answer

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.