I configured the default virtual server domaintest.com , all OK.
Installed a second virtual server with wordpress, called wordpress.domaintest.com , all OK.
Installed a third virtual server subdomain called crm.domaintest.com… but in this case it only servers HTML pages.
I enabled and configured PHP 8.3 thru the virtualmin interface, using FPM.
No PHP rendering at all.
If I go to the UNIX prompt, the php commands do work and render in the terminal OK.
so all three Virtual Servers in their public_html directories have one or more of index.htm index.html index.php ?
if so then its really strange what’s going on
when you get the error_log entry, is there a matching access_log entry too?
your 3rd server you called a subdomain (which it obviously is) – does that one differ any from the other two? That is, is each its own Virtual Server and each have its own /home/ directory where all their respective files are stored?
Full disclosure – all my experience is on RedHat systems, so not sure if anything I say can be helpful
I also read posts about removing a default installed package libapache2-mod-fcgid, which also removed virtualmin-lamp-stack. No success. I put hem back. I checked php config and I saw no modphp enabled.
So for the erroring VS Apache2 is working as yo can see the index.html file as “Hello World”
but you cannot see the index.php file “phpinfo”
check in the Web Configuration ->PHP Options for that domain to confirm the execution mode is “FPM” and not disabled.
I saw in the other virtualmins that the owners of the public html files is the virtualmin virtualserver user
Looks like for some reason, the directory and files inside
/home/crm/public_html
had owner “www-data” instead of “crm” (the user of the virtualmin virtual server).
I changed rights to crm as owner and permissions to 0644 and worked!
also, a general comment – somewhere there is a setting, per apache virtual server config, of which order to search for the default file (name) — index.htm, index.html, index.php – etc — the first one it finds is what will be served out when a specific file is not listed/chosen on your URL.
so http://example.com/index.htm will always display that file if it exists, but just http://example.com will follow whatever apache says to look for – so having more than one index.XXXX file can be confusing
and its so sad that apache cannot clearly say — Hey I see the file but cannot open it because of permissions – such an entry in the logs would help all of us !!
I uploaded the files from my Windows computer. Maybe there’s something during the file transfer and copy from Windows to Debian Virtualmin using WinSCP that puts the user and permission of the files wrong or are inherited from somewhere configuration.
How did you upload them? If you used the nice File Manger it would have taken care of the correct user and permissions.
But if these were uploaded by some other FTP (yes even Filezilla) it would be up to you to take care of it. That is especially true of files that are develped on your local Windows machine. Also you need to be aware that such files could have the wrong line and file ending.