[systemd-devel] Antw: [EXT] Re: Need help with setting up systemd for Apache on Debian 10

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Tue Aug 25 05:43:03 UTC 2020


Hi!

The next challenge with systemd would be this: Have a password-protected
server key, needing to ask for the password when starting...

Regards,
Ulrich

>>> Tom Browder <tom.browder at gmail.com> schrieb am 24.08.2020 um 16:59 in
Nachricht
<CAFMGiz8YMkq9f0bq6po9C6c+i9gCZ6rUnp5N190ekC2yWVbFvw at mail.gmail.com>:
> On Sun, Aug 23, 2020 at 12:19 PM Tom Browder <tom.browder at gmail.com> wrote:
>> There is no official Apache systemd setup for Apache from source, and
> ...
> 
> My original post was too harsh. My requests for help haven't been very
> clear. Thanks to hints and questions here, I took the time to do a
> little scarier experimentation with my live Apache installation and
> now have a service file that seems to work. In it I have added
> documentation to refresh tired and failing memories:
> 
> $ cat apache2.service
> # Debian 10 installation instructions:
> #
> # See systemd documentation in:
> #
> #   man systemd.unit
> #   man systemd.service
> #
> # Place a copy of this file into:
> #   /etc/systemd/system/
> #
> # After creating or modifying any unit files, we must tell systemd
> # that we want it to look for new things:
> #
> #   # systemctl daemon‑reload
> #
> # Our new service should be recognized at this point, but it won't run
> # yet. We need to do two more things. First, tell systemd to enable
> # it, so that it will start every time we boot:
> #
> #   # systemctl enable apache2.service
> #
> # Second, start it now:
> #
> #   # systemctl start apache2.service
> #
> # Note that you don't get feedback from this command, because all it
> # does it send a message to systemd telling it to start your
> # service. The command you typed doesn't hang around to see what
> # happens next. You may use systemctl status myservice.service (or
> # systemctl status myservice) to check on your service, to make sure
> # it seems OK.
> #
> #   # systemctl status apache2.service
> #   # systemctl status apache2
> #
> # Also note that systemctl status myservice gives more information if
> # you run it as root, compared to running it as a normal user.
> 
> [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/local/apache2/bin/apachectl ‑k start
> ExecStop=/usr/local/apache2/bin/apachectl ‑k stop
> ExecReload=/usr/local/apache2/bin/apachectl ‑k graceful
> PrivateTmp=true
> Restart=on‑abort
> 
> [Install]
> WantedBy=multi‑user.target
> # EOF
> 
> Thank you.
> 
> ‑Tom
> _______________________________________________
> systemd‑devel mailing list
> systemd‑devel at lists.freedesktop.org 
> https://lists.freedesktop.org/mailman/listinfo/systemd‑devel 





More information about the systemd-devel mailing list