Re: apache無法啟動
※ 引述《nonnn.bbs@ptt.cc (p幣不夠啦 NN)》之銘言:
> 小弟手動啟動apache
> /usr/local/sbin/apachectl start
> 出現了以下的信息
Apache 出現 httpd.mm 錯誤(EAPI_MM_CORE_PATH沒設好)
給你參考一下我之前也遇過這問題
Ouch! ap_mm_create(1048576, "/usr/local/run/httpd.mm.35613") failed
Error: MM: mm:core: failed to open semaphore file (No such file or
directory): OS: No such file or directory
查了一下 Google,在 FreeBSD mailing list 找到完整解答,
於是又重新編譯 Apache 1.3.33 + mod_ssl
( http://tinyurl.com/4ubog )
Apache mod_ssl httpd.mm semaphore; absolute EAPI_MM_CORE_PATH
Oliver Crow ocrow at simplexity.net
Fri Nov 7 11:55:19 PST 2003
* Previous message: Apache ports confusion.
* Next message: apache13 port problems
* Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
-- Problem --
Attempting to run apache as a non root user when you have built apache
with mod_ssl using the www/apache13-modssl port, the following error
message appears when you start apache:
> Ouch! ap_mm_create(1048576, "/var/run/httpd.mm.82733") failed
> Error: MM: mm:core: failed to open semaphore file (No such file or
> directory): OS: No such file or directory
The apache binary is hardcoded with the directory in which to create an
httpd.mm semaphore file. The default path (/var/run) is only writable by
the root user. There is no httpd.conf configuration directive to change
the semaphore directory, because this path must be set before the apache
conf file is read.
-- Solution --
Run 'httpd -V' and you will see a line like this:
-D EAPI_MM_CORE_PATH="/var/run/httpd.mm"
If the EAPI_MM_CORE_PATH is absolute (begins with a '/') you cannot
change the path at runtime. If it is relative (doesn't begin with a
slash), the actual path used will be relative to the ServerRoot which can
be set using 'http -d /path/to/serverroot'.
By default on FreeBSD the EAPI_MM_CORE_PATH is absolute. To change it
apache must be rebuilt from the port with different configuration
settings. If you built from the apache13-modssl port, create a file
'/usr/ports/www/apache13-modssl/Makefile.local' with the following line:
CONFIGURE_ARGS+=--runtimedir=run
After rebuilding and installing the port, 'httpd -V' will have this line:
-D EAPI_MM_CORE_PATH="run/httpd.mm"
and you can configure apache to use a user specific directory for the
httpd.mm semaphore files. For example:
% httpd -d /home/user1/www
will try to put the semaphore files in /home/user1/www/run/httpd.mm.%%
--
靜中見真境,淡中識本然
chinsan <chinsan@mail2000.com.tw>
--
◢◣ - ● -
◢██◣◢◣ ` Origin: 宜蘭資教.山水蘭陽 telnet://yilan.twbbs.org
~~ ﹌ ~﹌ ﹉ From : 59-104-35-197.adsl.dynamic.seed.net.tw
討論串 (同標題文章)
FreeBSD 近期熱門文章
PTT數位生活區 即時熱門文章