Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Virtual Host Config files that rewrite themselves...

Is there any way to stop this from happening? I really need to use a custom configuration but I keep finding that the file is rewritten (with what pretty much ammounts to gibberish) every time I start up web services. To make matters worse, Apache is borked and wont run until I remove the virtual host config file entirely. What the GUI provides does not work for the site I need to host. Ultimately the config works just fine so long as it doesn't get altered by Server Admin (I suppose that's what's altering the file).


Can someone save me from Apple's insistance of doing **** for me?


😟

Posted on Apr 2, 2012 12:40 AM

Reply
Question marked as Best reply

Posted on Apr 2, 2012 5:37 AM

You're not the only one to tussle with this.


While details of what particular "special" configuration is required here might help tailor this answer, in general you have some obvious choices:


  1. Conform to Apple's norms when directly modifying the configuration files (and generally using Server Admin or Server.app tools) and avoid modifying the configuration files
  2. Not using Server Admin nor Server.app tools (somewhat risky, as updates can access these files)
  3. Using an operating system platform that more directly supports your requirements (probably the best approach); there are OS platforms available that specifically support these sorts of customizations and configuration modifications.
  4. Change your requirements to match what OS X Server provides.


With details of what you're doing that's different or special or not supported by the current tools, you might consider logging some specific enhancement suggestions with Apple for consideration and potential inclusion in future releases of the tools.

4 replies
Question marked as Best reply

Apr 2, 2012 5:37 AM in response to zenasprime

You're not the only one to tussle with this.


While details of what particular "special" configuration is required here might help tailor this answer, in general you have some obvious choices:


  1. Conform to Apple's norms when directly modifying the configuration files (and generally using Server Admin or Server.app tools) and avoid modifying the configuration files
  2. Not using Server Admin nor Server.app tools (somewhat risky, as updates can access these files)
  3. Using an operating system platform that more directly supports your requirements (probably the best approach); there are OS platforms available that specifically support these sorts of customizations and configuration modifications.
  4. Change your requirements to match what OS X Server provides.


With details of what you're doing that's different or special or not supported by the current tools, you might consider logging some specific enhancement suggestions with Apple for consideration and potential inclusion in future releases of the tools.

Apr 2, 2012 12:06 PM in response to MrHoffman

Seriously? There's no means by which to custom configure VHosts without Server Admin re-writing them in a way that borks Apache? Personally I wouldn't use Server Admin for web services configuration if I didn't have to use it for some of the other services. For the longest time I wouldn't use it for BIND because it couldn't configure a zone file to save the universe but they've since fixed most of the issues with it that I had.


To address your points...


1. Is there a reference somewhere that defines these so called norms so I can know what I need to dance around in order for a custom config to work?


2. All I really use Server Admin for is the convience of the initial setup and turning serviced on and off when needed. If I could get away from using it all together I wouldn't feel any great loss. Point me to the "HOWTO use OS X server without Server Admin".


3. With the exception of this annoying habit to change configuration files to gibberish and Apple's "we know best so STFU or GTFO" attitude towards custom configurations, I'm actually pleased with how the platform functions for my needs and it integrates much better with the rest of my computing needs then any of the other solutions available.


4. My requirements include hosting a Diaspora pod, which it seems to be able to do well enough so long as the configuration file isn't altered by the admin tools. o.O


My enhancement suggestion for Apple would be "Learn how to write a GUI wrapper that doesn't interfear with the generally agreed upon methods by which to configure services readily available on most other platforms unimpeeded." Somehow I don't think they will listen. 😟

Apr 2, 2012 12:38 PM in response to zenasprime

You're not the first person to slam into this wall, err, this difference in management interfaces and server management style. I certainly slammed it, too.


With your present management preference, you're going to be pounding against how Apple configures OS X and OS X Server and how Apple expects the OS to be managed, and that's not going to be "fun". As you've discovered. Otherwise, you're (often) going to have to "let go" of the use of the configuration files and related management interfaces.


Partiocularly around Apache and its configuration files. Various components of OS X Server modify those files "themselves".


Loading Linux or one of the BSD variants and using that might be a much better fit for how you prefer to operate and manage your server. I have some "weird" boxes around for this reason; for tasks that OS X Server just isn't good at.


For the available documentation, see the OS X Server Snow Leopard Server 10.6 documentation set for most of what's available. The Lion Server documentation is not as extensive as the Snow Leopard Server documentation. It is possible to step beyond what Server Admin and Server apps allow, but there's little specific documentation around the conflicts. As should be obvious: I'm not aware of any specific documentation around what you can "get away with" here, beyond the manuals and beyond (careful) use of the defaults command and various plist files.


You haven't provided details on what you're doing with the Apache configuration files (beyond setting up a Diaspora pod, and I haven't experimented with that), nor with what particular sort of "gibberish" arises here. If you're using a shell-level ASCII-based text editor (nano, vim, emacs, etc) (and not a GUI-based or Unicode-based or other editor), then the usual behavior of Server Admin and Server.app would be to revert the Apache files to their previous state, or to get confused.


While providing full access into the configuration files through a GUI tool and preserving the settings is a good goal for a more advanced user, it's also a massive undertaking, particularly if you're trying to avoid (as Apple is) a massively confusing management interface. Apple substantially simplified the management interfaces with Lion Server and removed a number of options and knobs, over what was available in Snow Leopard Server, too.

Virtual Host Config files that rewrite themselves...

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.