Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Snow Leopard Server I was able to add lines to the Apache vhost files in /etc/apache2/sites in order to add custom configuration options.

In Lion Server those changes are overwritten as soon as the Web service is restarted. Is there any way to add such configuration options in a way they'll be preserved?

share|improve this question

Yes. In Lion, you do this by:

  • Creating a .conf file that contains your custom Apache configuration directives
  • Creating a .plist file in /etc/apache2/webapps that references your configuration file — see the manage for webapp.plist
  • Running webappctl to load your configuration file into one or more of your websites (virtual hosts) — see the manage for webappctl

A bit more about this can be seen at

share|improve this answer

Your Answer


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.