如何更改默认的Apache httpd.conf文件位置

坦莫伊

apache httpd配置文件httpd.conf的默认位置是apache-http-root \ conf文件夹。如何更改此位置以从其他位置加载配置文件?

坦莫伊

如果要安装Apache Httpd作为Windows服务,则需要运行以下命令:

httpd.exe -k install

如果使用此命令,则该服务将称为Apache2.4,并且假定配置为conf \ httpd.conf。

如果需要指定要安装的服务的名称,请使用以下命令。如果您在计算机上安装了几种不同的Apache服务,则必须执行此操作。如果在安装期间指定了名称,则还必须在其他任何-k操作期间指定名称。

httpd.exe -k install -n "MyServiceName"

如果需要为不同的服务专门命名的配置文件,则必须使用以下命令:

httpd.exe -k install -n "MyServiceName" -f "c:\files\my.conf"

如果使用此命令,则该服务将称为MyServiceName,并且假定配置为c:\ files \ my.conf。

来源:https : //httpd.apache.org/docs/current/platform/windows.html

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章