Re: Mac Yosemite 10.10.1,Apache 2.4.9
Apache2.4.9似乎忽略了PidFile指令,总是在/var/run/httpd.pid创建一个进程id文件。这使得不可能启动httpd的多个实例,每个实例都在不同的端口上侦听。例如,Apache2.2.26没有这个问题。
所以你自己看看:
1)修改Apache的“默认”Mac配置文件/etc/apache2/httpd.conf,以包含(就在ServerRoot之后)一个指令,如:
PidFile "/var/log/apache2/apache.pid“
2)启动Apache:
数多点启动
3)注意到指定的.pid文件丢失了,相反,Apache创建了/var/run/httpd.pid。
怎么修?
发布于 2015-01-06 23:48:46
这不是窃听器。您刚刚忽略了默认配置包括/etc/apache2/extra/httpd-mpm.conf这一事实,它在第12行设置了PidFile:
#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
# Note that this is the default PidFile for most MPMs.
#
<IfModule !mpm_netware_module>
PidFile "/private/var/run/httpd.pid"
</IfModule>https://stackoverflow.com/questions/27809061
复制相似问题