问题
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?
回答1:
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.
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.
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.
来源:https://stackoverflow.com/questions/24328702/how-do-i-change-the-location-of-the-httpd-conf-for-apache-on-windows