Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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
add comment

1 Answer 1

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 http://support.apple.com/kb/HT4813

share|improve this answer
add comment

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.