search

Home  >  Q&A  >  body text

ubuntu - apachectl无法正常开启关闭apache

操作系统:阿里云-Ubuntu14.04
服务器:apache2.4.20

自己编译安装的apache,配置命令如下:

./configure --prefix=/usr/local/apache2 --enable-proxy --enable-proxy-ajp --enable-rewrite --enable-so --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre

随即输入命令/usr/local/apache2/bin/apachectl可以检测httpd.conf,但是无法正常打开、关闭以及重启http服务,报错如下:

httpd (no pid file) not running

然后我们打开网址http://12.34.56.78/,页面显示It works!

请问这是为什么?是因为什么没有配置好吗?还是因为需要自己写脚本打开、关闭以及重启apache服务?

高洛峰高洛峰2842 days ago413

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-04-24 09:11:04

    Check the location of the pid file and confirm whether apache has permissions to the directory where the pid is located.

    reply
    0
  • Cancelreply