0

我正在使用 Fedora 版本 23(二十三)和 Apache/2.4.23(Fedora)

我注意到 apache 2.4 在启动时默认使用 -DFOREGROUND:

/usr/sbin/httpd -DFOREGROUND

我不想要 -DFOREGROUND,对于我以前使用的 apache 2.2,它有

/usr/sbin/httpd -k start

这就是我想要的。所以我修改了httpd.service:

# ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND  # default in apache 2.4
ExecStart=/usr/sbin/httpd $OPTIONS -k start        # this is what I want and in the previous machine that has apache 2.2

但更改后,在“systemctl daemon-reload”和“service httpd start”之后,httpd状态显示为inactive(dead):

● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Mon 2017-03-06 10:18:37 CST; 1min 20s ago
 Main PID: 4464 (code=exited, status=0/SUCCESS)
   Status: "Total requests: 89051; Idle/Busy workers 75/25;Requests/sec: 0.279; Bytes served/sec: 4.1KB/sec"

Mar 02 17:48:19 GAFServer systemd[1]: Starting The Apache HTTP Server...
Mar 02 17:48:19 GAFServer httpd[4464]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::fe4d:d4ff:fef1:e121. Set the 'ServerName' directive globally to suppress this message
Mar 02 17:48:19 GAFServer systemd[1]: Started The Apache HTTP Server.
Mar 06 03:32:01 GAFServer httpd[23093]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::fe4d:d4ff:fef1:e121. Set the 'ServerName' directive globally to suppress this message
Mar 06 03:32:01 GAFServer systemd[1]: Reloaded The Apache HTTP Server.
Mar 06 10:18:35 GAFServer systemd[1]: Stopping The Apache HTTP Server...
Mar 06 10:18:37 GAFServer systemd[1]: Stopped The Apache HTTP Server.

我很困惑,apache 文档中关于什么是 DFOREGROUND 以及我还有哪些其他选项的内容很少,我该如何停止使用这个 DFOREGROUND?

4

0 回答 0