/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>/

/ServerAdmin ad...@example.com/

/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>/


/<Directory /home/tst01/bin>/

/Options Indexes FollowSymLinks ExecCGI /

/AllowOverride all/

/Require all granted/

/</Directory>/



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

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

/</VirtualHost>/

/-----------------------------------------/


/My /etc/hosts has: 10.0.2.15 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 server"./


/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. /


/Brian/


Reply via email to