如何在Windows上更改Apache的httpd.conf的位置? [英] how do I change the location of the httpd.conf for Apache on windows?
问题描述
我正在努力在Windows Server 2012上设置负载平衡群集,并且有一个共享驱动器,我想在其中存在Apache的配置文件.这样,LB的每个成员都可以加载完全相同的配置文件.如何独立于ServerRoot的位置更改配置文件的位置?
I am working on setting up a load balancing cluster on windows server 2012 and have a shared drive where I want the configuration files for Apache to exist at. This way each member of the LB can load the exact same config files. How do I change where the config file is located independently of where the ServerRoot is?
推荐答案
使用-d
参数启动Apache进程,并提供替代的ServerRoot
作为参数,尽管我认为这是一个更好的主意.供您使用某种机制将文件本地同步到每个服务器.
Start the Apache process with the -d
parameter and give your alternative ServerRoot
as an argument, though I'd imagine it would be a much better idea for you to use some mechanism to sync the files locally to each server.
也请阅读 http://httpd.apache.org/docs/2.4/mod/core.html#mutex ,因为如果您是从网络文件系统运行的,建议您这样做.
Also read http://httpd.apache.org/docs/2.4/mod/core.html#mutex, as it's advised if you're running from a networked file system.
如果只想指定主配置文件,则以-f
参数和该配置文件的路径作为参数开始该过程.
If you just want to specify the main config file, start the process with the -f
parameter and the path to the config file as an argument.
这篇关于如何在Windows上更改Apache的httpd.conf的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!