Sha*_*hah 503 linux apache ubuntu amazon-ec2 httpd.conf
如何找到httpd.conf文件的位置?
我正在从Amazon Web Services EC2(弹性计算云)运行Ubuntu Linux服务器,但我找不到我的Apache配置.
squ*_*guy 642
获取运行Apache的路径
$ ps -ef | grep apache
apache 12846 14590 0 Oct20 ? 00:00:00 /usr/sbin/apache2
Run Code Online (Sandbox Code Playgroud)
将-V参数附加到路径
$ /usr/sbin/apache2 -V | grep SERVER_CONFIG_FILE
-D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
Run Code Online (Sandbox Code Playgroud)
参考:http:
//commanigy.com/blog/2011/6/8/finding-apache-configuration-file-httpd-conf-location
Ric*_*wen 209
有关在各种平台上可能找到Apache httpd配置文件的位置的讨论,请参阅http://wiki.apache.org/httpd/DistrosDefaultLayout,因为这可能因发行版和平台而异.但是,最常见的答案是/ etc/apache/conf或/ etc/httpd/conf
通常,您可以通过运行命令来确定答案:
httpd -V
(那是首都V).或者,也许在重命名httpd的系统上apache2ctl -V
这将返回有关如何构建和配置httpd的各种详细信息,包括主配置文件的默认位置.
其中一行输出应如下所示:
-D SERVER_CONFIG_FILE ="conf/httpd.conf"
其中,结合线:
-D HTTPD_ROOT ="/ etc/httpd"
将为您提供配置文件的默认位置的完整路径
| 归档时间: |
|
| 查看次数: |
1046224 次 |
| 最近记录: |