Le mar. 16 mai 2023, 20:58, Neil Bothwick <n...@digimed.co.uk> a écrit :
> On Tue, 16 May 2023 20:03:36 +0200, Jacques Montier wrote: > > > It was very difficult to get Apache working with systemd Gentoo. > > No apache2.service found with apache installation. > > Really? > > % qfile apache2.service > www-servers/apache: /lib/systemd/system/apache2.service > > Yes. > After install, apache2.service not found... > > > > so i looked at the Linux Mint OS to copy the apache2.service. > > These commands > > > > ExecStart=/usr/sbin/apachectl start > > ExecStop=/usr/sbin/apachectl graceful-stop > > ExecReload=/usr/sbin/apachectl graceful > > > > did not work at all... > > % systemctl cat apache2.service > # /lib/systemd/system/apache2.service > [Unit] > Description=The Apache HTTP Server > After=network.target remote-fs.target nss-lookup.target > > [Service] > EnvironmentFile=/etc/conf.d/apache2 > ExecStart=/usr/sbin/apache2 $APACHE2_OPTS -DFOREGROUND > ExecReload=/usr/sbin/apache2 $APACHE2_OPTS -k graceful > ExecStop=/usr/sbin/apache2 $APACHE2_OPTS -k graceful-stop > # We want systemd to give httpd some time to finish gracefully, but still > want # it to kill httpd after TimeoutStopSec if something went wrong > during the # graceful stop. Normally, Systemd sends SIGTERM signal right > after the # ExecStop, which would kill httpd. We are sending useless > SIGCONT here to give # httpd time to finish. > KillSignal=SIGCONT > PrivateTmp=true > #Hardening > CapabilityBoundingSet=CAP_CHOWN CAP_SETGID CAP_SETUID CAP_DAC_OVERRIDE > CAP_KILL CAP_NET_BIND_SERVICE CAP_IPC_LOCK > SecureBits=noroot-locked > ProtectSystem=full > PrivateDevices=true > MemoryDenyWriteExecute=true > > [Install] > WantedBy=multi-user.target > > > -- > Neil Bothwick > > K: (n., adj.) a binary thousand, which isn't a decimal thousand or even > really a binary thousand (which is eight), but is the binary number > closest to a decimal thousand. This has proven so completely confusing > that it has become a standard. > Thanks Neil, i'll have a try. -- Jacques >