httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brian <>
Subject [users@httpd] Problem with suexec in apache 2.4
Date Sat, 19 Jul 2014 22:54:39 GMT
/I'm getting a 404 when I try to use suexec. I'm using centos 7, apache 
2.4.9, and php 5.5.14. I compiled from source./

/Here is my virtual host:/


/<VirtualHost *:80>/


/ServerName tst01.local/

/DocumentRoot "/home/tst01/public_html"/

/#for suexec/

/SuexecUserGroup tst01 tst01/

/ScriptAlias /php5-cgi /home/tst01/bin/php-cgi /

/Action php5-cgi /php5-cgi /

/AddHandler php5-cgi .php /

/<Directory /home/tst01/public_html>/

/Options Indexes FollowSymLinks /

/AllowOverride all/

/Require all granted/


/<Directory /home/tst01/bin>/

/Options Indexes FollowSymLinks ExecCGI /

/AllowOverride all/

/Require all granted/


/ErrorLog /home/tst01/logs/error.log/

/CustomLog /home/tst01/logs/access.log combined/



/My /etc/hosts has: tst01.local/

/I have the file /home/tst01/public_html/whoami.php/


/<?php echo "Output of the 'whoami' command:<br /><br />";/

/echo exec('/usr/bin/whoami');?>/


/I changed the permissions to 755/

/The file has /home/tst01/bin/php-cgi/


/#!/bin/bash /

//usr/local/php5p5/bin/php-cgi "$@"/


/It permissions is 755 and owner is tst01/

/In a browser if I go to http://tst01.local/whoami.php. I get a 404 with 
the msg "The requested URL /php5-cgi/whoami.php was not found on this 

/I can run php without suexec when I link directly to the php in 
/usr/local. /

/I'm trying to replace suphp. I'm open to other options. /


View raw message