Sample Header Ad - 728x90

PHP and suexec on Debian Stretch

0 votes
1 answer
910 views
I am trying to get suexec working with PHP on Debian Stretch (Apache 2.4.25). I have the Debian package's default set of modules loaded plus cgid and php7.0. This is the VirtualHost block I'm using on my test system: ServerAdmin webmaster@localhost DocumentRoot /var/www ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined ScriptAlias /cgi-bin/ /var/www/cgi-bin/ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Require all granted SuexecUserGroup testuser testuser This works correctly with a simple perl script in /var/www/cgi-bin that prints the process's UID. The script prints 1000, verifying that suexec is working. I also get the expected line in suexec.log: However, when I use a similar PHP script, suexec is never called and the script runs as the Apache user. How can I get suexec to work with PHP scripts?
Asked by Flup (8335 rep)
Jul 28, 2017, 11:01 AM
Last activity: Jul 28, 2017, 10:14 PM