[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apache2ctl vs systemctl?



Hello,

i notice a difference in behaviour in using both commands,

apache2ctl:
* (re)start works fine, sites are available

systemctl:
* (re)start seems to work, but sites are not available

Has anyone experienced this?

(in this case a multi vhost and cert setup)

(apachectl is a symlink to apache2ctl)

--

#apache2ctl status
                  Apache Server Status for localhost (via ::1)

   Server Version: Apache/2.4.57 (Debian) mpm-itk/2.4.7-04
OpenSSL/3.0.9
   Server MPM: prefork
   Server Built: 2023-04-13T03:26:51
     __________________________________________________________________

   Current Time: Friday, 15-Sep-2023 12:15:46 CEST
   Restart Time: Friday, 15-Sep-2023 12:06:20 CEST
   Parent Server Config. Generation: 2
   Parent Server MPM Generation: 1
   Server uptime: 9 minutes 25 seconds
   Server load: 0.01 0.04 0.09
   Total accesses: 110 - Total Traffic: 35.9 MB - Total Duration: 13341
   CPU Usage: u1.6 s1.08 cu.6 cs.67 - .699% CPU load
   .195 requests/sec - 65.0 kB/second - 333.8 kB/request - 121.282
          ms/request

   1 requests currently being processed, 9 idle workers

_.______W__.....................................................
................................................................
......................

   Scoreboard Key:
   "_" Waiting for Connection, "S" Starting up, "R" Reading Request,
   "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
   "C" Closing connection, "L" Logging, "G" Gracefully finishing,
   "I" Idle cleanup of worker, "." Open slot with no current process

--

# systemctl status apache2.service
○ apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled;
preset: enabled)
     Active: inactive (dead) since Fri 2023-09-15 12:01:55 CEST; 14min
ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 5766 ExecStart=/usr/sbin/apachectl start (code=exited,
status=0/SUCCESS)
    Process: 5770 ExecStop=/usr/sbin/apachectl graceful-stop
(code=exited, status=0/SUCCESS)
        CPU: 424ms

sep 15 12:01:54 server systemd[1]: Starting apache2.service - The
Apache HTTP Server...
sep 15 12:01:54 server apachectl[5769]: [Fri Sep 15 12:01:54.969836
2023] [core:trace3] [pid 5769] core.>
sep 15 12:01:54 server apachectl[5769]: [Fri Sep 15 12:01:54.970266
2023] [core:trace6] [pid 5769] core.>
sep 15 12:01:54 server apachectl[5769]: [Fri Sep 15 12:01:54.970331
2023] [core:trace3] [pid 5769] core.>
sep 15 12:01:55 server apachectl[5769]: httpd (pid 5425) already
running
sep 15 12:01:55 server apachectl[5772]: [Fri Sep 15 12:01:55.220741
2023] [core:trace3] [pid 5772] core.>
sep 15 12:01:55 server apachectl[5772]: [Fri Sep 15 12:01:55.220809
2023] [core:trace6] [pid 5772] core.>
sep 15 12:01:55 server apachectl[5772]: [Fri Sep 15 12:01:55.220813
2023] [core:trace3] [pid 5772] core.>
sep 15 12:01:55 server systemd[1]: apache2.service: Deactivated
successfully.
sep 15 12:01:55 server systemd[1]: Started apache2.service - The Apache
HTTP Server.

mvg,
Wim

Reply to: