Desperately trying to set up suPHP or suexec_custom or mod_fcgid - been at this all day, this is crazy

Hi,

All i want to do is allow my domain to run as username and not apache. But everything i try to do i run into a roadblock. suPHP dont work all of my pages want to download when you try to load them, plus examples online and videos are horrible and the documention with apache is worse, so i uninstalled suPHP.

Now im trying mod_fcgid but and i thought i had it but virtualmin creates their fcgi bin folder outside of the suexec zone and again im stuck.

You would think as many years that this has been around that there would be tons of videos or tons of docs showing people how to do it, but there is no standarization at all, everyone does it different and how is someone new going to learn when there are so many different ways to do one thing.

I been at this all day and im getting very discouraged here.

Does anyone know how to do this with either suPHP or mod_fcgid and can walk me thru it please.

here is my virtual host for the ssl

ServerAdmin webmaster@example.com ServerName example.com ServerAlias www.example.com ServerAlias webmail.example.com ServerAlias admin.example.com DocumentRoot /home/username/public_html # #this is for mod_fcgid SuexecUserGroup username username Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI AllowOverride All Options=Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,Options AddOutputFilter INCLUDES .shtml AddType text/html .shtml AddHandler fcgid-script .php FCGIWrapper /home/username/fcgi-bin/php5.fcgi .php Order allow,deny Allow from all #end fcgid # ErrorLog /var/log/virtualmin/example.com_error_log CustomLog /var/log/virtualmin/example.com_access_log combined ScriptAlias /cgi-bin/ /home/username/cgi-bin/ DirectoryIndex index.html index.htm index.php # # #this is the old way using mod_php5 # #Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI #allow from all #AllowOverride All Options=Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,Options #AddOutputFilter INCLUDES .shtml #AddType text/html .shtml #AddType application/x-httpd-php .php #AddType application/x-httpd-php5 .php5 # #end old way # # allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch # SSLEngine on SSLCertificateFile /home/username/my_ssl_cert.crt SSLCertificateKeyFile /home/username/my_ssl_key.key SSLCACertificateFile /home/username/ssl.ca SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2 SSLVerifyClient optional ErrorLog /home/username/my_ssl_log.log #

and here is my fcigd config

This is the Apache server configuration file for providing FastCGI support

through mod_fcgid

Documentation is available at

http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html

LoadModule fcgid_module modules/mod_fcgid.so

Use FastCGI to process .fcg .fcgi & .fpl scripts

AddHandler fcgid-script fcg fcgi fpl

Sane place to put sockets and shared memory file

FcgidIPCDir /var/run/mod_fcgid
FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm

#added by dave
PHP_Fix_Pathinfo_Enable 1

and here is the suexec log

[2016-09-23 09:42:14]: uid: (501/username) gid: (501/username) cmd: php5.fcgi [2016-09-23 09:42:14]: command not in docroot (/home/username/fcgi-bin/php5.fcgi)


all i am getting is a internal server error
i have set the settings for the virt host in virtualmin website options to yes cgi and chose fcgid as well.

Thanks :slight_smile:

nevermind i finally gave up, i will just leave it as it is.