I am on CentOS 7 running custom compiled Apache and PHP-FPM through systemd.

I have the following systemd scripts in /opt/etc/systemd/system/.
----------------------------------------------------------------------------------------------------------------------------------
php-fpm.service:
[root@goose system]# cat php-fpm.service
[Unit]
Description=The PHP FastCGI Process Manager
After=syslog.target network.target

[Service]
type=forking
PIDFile=/opt/logs/php-fpm.pid
EnvironmentFile=/opt/etc/sysconfig/php-fpm
ExecStart=/opt/sbin/php-fpm --nodaemonize --fpm-config 
/opt/etc/apache/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID

[Install]
WantedBy=multi-user.target
----------------------------------------------------------------------------------------------------------------------------------
httpd.service:
[root@goose system]# cat httpd.service
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
Documentation=man:httpd(8)
Documentation=man:apachectl(8)

[Service]
Type=forking
PIDFile=/opt/logs/httpd.pid
EnvironmentFile=/opt/etc/sysconfig/httpd
ExecStart=/opt/bin/apachectl start --nodaemon
ExecReload=/opt/bin/apachectl reload
ExecStop=/opt/bin/apachectl stop

[Install]
WantedBy=multi-user.target
----------------------------------------------------------------------------------------------------------------------------------------
htcacheclean.service:
[root@goose system]# cat htcacheclean.service
[Unit]
Description=Disk Cache Cleaning Daemon for Apache HTTP Server
After=httpd.service
Documentation=man:htcacheclean(8)

[Service]
Type=forking
User=apache
PIDFile=/run/httpd/htcacheclean/pid
EnvironmentFile=/opt/etc/sysconfig/htcacheclean
ExecStart=/opt/bin/htcacheclean -P /run/httpd/htcacheclean/pid -d $INTERVAL -p 
$CACHE_ROOT -l $LIMIT $OPTIONS
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Note that the stock httpd.service file doesn't set the type to forking and it 
has an option of PrivateTMP or something similar.

I don't recall seeing type forking in the stock php-fpm.service file either.

What is the htcacheclean service? How do I make sure that it caches to where I 
expect it to? I suspect the CACHE_ROOT should be set to /opt/var/cache/apache 
or something similar. I compiled Apache and PHP-FPM to /opt to make sure I 
don't collide accidentally with the stock php and apache which are yum removed 
at the moment. Any tips on how to turn selinux back on and configure it to 
recognize the /opt/htdocs/... document roots would be much appreciated.
_______________________________________________
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to