Need help with setting up systemd for Apache on Debian 10

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

 



There is no official Apache systemd setup for Apache from source, and
I didn't get any help from users there. I tried to mimic a good
solution by first installing Apache with the Debian package and
finding all the systemd files with "httpd" or "apache" in the name.
That resulted in the following list:

    /etc/systemd/system/multi-user.target.wants/apache2.service
    /run/systemd/units/invocation:apache2.service
    /usr/lib/systemd/system/apache2.service
    /var/lib/systemd/deb-systemd-helper-enabled/apache2.service.dsh-also
    /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/apache2.service

The contents of the "apache2.service" file are:

    [Unit]
    Description=The Apache HTTP Server
    After=network.target remote-fs.target nss-lookup.target

    [Service]
    Type=forking
    Environment=APACHE_STARTED_BY_SYSTEMD=true
    ExecStart=/usr/sbin/apachectl start
    ExecStop=/usr/sbin/apachectl stop
    ExecReload=/usr/sbin/apachectl graceful
    PrivateTmp=true
    Restart=on-abort

    [Install]
    WantedBy=multi-user.target

For each of the files in the list O executed "ls -l" and got the
following results:

File 1 (links to File 3 below)
==============================
/etc/systemd/system/multi-user.target.wants/apache2.service
  lrwxrwxrwx 1 root root 35 Jun 18 16:01
  /etc/systemd/system/multi-user.target.wants/apache2.service
  -> /lib/systemd/system/apache2.service

File 2 (links to some hash)??
=============================
/run/systemd/units/invocation:apache2.service
  lrwxrwxrwx 1 root root 32 Jun 18 16:01
  /run/systemd/units/invocation:apache2.service
  -> 5b87576fe6a04e079651d979d8a9c7f6

File 3
======
/usr/lib/systemd/system/apache2.service
  -rw-r--r-- 1 root root 395 Oct 13  2019
  /usr/lib/systemd/system/apache2.service

File 4
======
/var/lib/systemd/deb-systemd-helper-enabled/apache2.service.dsh-also
  -rw-r--r-- 1 root root 60 Jun 18 16:01
  /var/lib/systemd/deb-systemd-helper-enabled/apache2.service.dsh-also

File 5
======
/var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/apache2.service
  -rw-r--r-- 1 root root 0 Jun 18 16:01
  /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/apache2.service

I assume the data are correct, and I'm pretty sure there is some
fancy, automated sysstemctl way to get it all working.  I would
greatly appreciate some guidance as to how to install the files
correctly.

Thanks.

Best regards,

-Tom
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux