开发者

How to manage apache configurations to make them more portable between servers?

开发者 https://www.devze.com 2023-01-18 05:29 出处:网络
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 file

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
0

精彩评论

暂无评论...
验证码 换一张
取 消