How to manage apache configurations to make them more portable between servers?
The common issue: you move an application from one server to another, usually this means other directories to configu开发者_Python百科re in your application configuration files and in apache conf files.
How can you minimize if even eliminate the hardcoded paths in config files?
In my case these applications are in languages like PHP, Python, Perl or Ruby. I will keep Java out of this question because for Java there are different ways of doing this.
I'm looking for a solution that would enable you to ease these troubles, one that would allow you to keep the config files in SCM and deploy them to one or more servers.
Please, do not vote this to be moved on serverfault.com, it is a question regarding how do you setup your development, staging and production environment.
$ ls ./apache-config-files
development.cnf staging.cnf production.cnf
$ ln -s ./apache-config-files/staging.cnf ./.htaccess
精彩评论