Apache listing php file, not executing it

Update: I have continue to struggle with this question, but I have a new (different) question, now at:

Thanks, all, for any insights.

@joe - I understand that it’s frustrating when newbies like me screw up their system. So I’ll be specific about where I am looking so I can be sure it’s the right thing. I will note that the Apache Server → Global Configuration → Configure Apache Modules now shows this:

You said I should:

  • uninstall mod_php I didn’t take careful notes of what I did, but history shows I used sudo apt-get purge libapache2-mod-php8.1 I also used ls -al /etc/php/8.1/mods-available/ and it shows the following. Is this the right directory??
deploy@hills:~$ ll /etc/php/8.1/mods-available/
total 140
drwxr-xr-x 2 root root 4096 Aug 30 21:30 ./
drwxr-xr-x 6 root root 4096 Sep 24 22:50 ../
-rw-r--r-- 1 root root   74 Aug 18 07:41 calendar.ini
-rw-r--r-- 1 root root   71 Aug 18 07:41 ctype.ini
-rw-r--r-- 1 root root   68 Aug 18 07:41 curl.ini
-rw-r--r-- 1 root root   66 Aug 18 07:41 dom.ini
-rw-r--r-- 1 root root   70 Aug 18 07:41 exif.ini
-rw-r--r-- 1 root root   69 Aug 18 07:41 ffi.ini
-rw-r--r-- 1 root root   74 Aug 18 07:41 fileinfo.ini
-rw-r--r-- 1 root root   69 Aug 18 07:41 ftp.ini
-rw-r--r-- 1 root root   64 Aug 18 07:41 gd.ini
-rw-r--r-- 1 root root   73 Aug 18 07:41 gettext.ini
-rw-r--r-- 1 root root   71 Aug 18 07:41 iconv.ini
-rw-r--r-- 1 root root   60 Jan 19  2022 imagick.ini
-rw-r--r-- 1 root root   76 Aug 18 07:41 mbstring.ini
-rw-r--r-- 1 root root   71 Aug 18 07:41 mysqli.ini
-rw-r--r-- 1 root root   72 Aug 18 07:41 mysqlnd.ini
-rw-r--r-- 1 root root   79 Aug 18 07:41 opcache.ini
-rw-r--r-- 1 root root   69 Aug 18 07:41 pdo.ini
-rw-r--r-- 1 root root   74 Aug 18 07:41 pdo_mysql.ini
-rw-r--r-- 1 root root   70 Aug 18 07:41 phar.ini
-rw-r--r-- 1 root root   71 Aug 18 07:41 posix.ini
-rw-r--r-- 1 root root   76 Aug 18 07:41 readline.ini
-rw-r--r-- 1 root root   71 Aug 18 07:41 shmop.ini
-rw-r--r-- 1 root root   72 Aug 18 07:41 simplexml.ini
-rw-r--r-- 1 root root   73 Aug 18 07:41 sockets.ini
-rw-r--r-- 1 root root   18 Jan  3  2022 ssh2.ini
-rw-r--r-- 1 root root   73 Aug 18 07:41 sysvmsg.ini
-rw-r--r-- 1 root root   73 Aug 18 07:41 sysvsem.ini
-rw-r--r-- 1 root root   73 Aug 18 07:41 sysvshm.ini
-rw-r--r-- 1 root root   75 Aug 18 07:41 tokenizer.ini
-rw-r--r-- 1 root root   66 Aug 18 07:41 xml.ini
-rw-r--r-- 1 root root   72 Aug 18 07:41 xmlreader.ini
-rw-r--r-- 1 root root   72 Aug 18 07:41 xmlwriter.ini
-rw-r--r-- 1 root root   66 Aug 18 07:41 xsl.ini
  • purge the config files for mod_php ll /etc/php/8.1/fpm/conf.d/ shows the following. Is the right directory? Are there any mod_php files remaining?
deploy@hills:~$ ll /etc/php/8.1/fpm/conf.d/
total 8
drwxr-xr-x 2 root root 4096 Aug 30 21:30 ./
drwxr-xr-x 4 root root 4096 Aug 30 21:08 ../
lrwxrwxrwx 1 root root   39 Aug 30 21:08 10-mysqlnd.ini -> /etc/php/8.1/mods-available/mysqlnd.ini
lrwxrwxrwx 1 root root   39 Aug 30 21:08 10-opcache.ini -> /etc/php/8.1/mods-available/opcache.ini
lrwxrwxrwx 1 root root   35 Aug 30 21:08 10-pdo.ini -> /etc/php/8.1/mods-available/pdo.ini
lrwxrwxrwx 1 root root   35 Aug 30 21:08 15-xml.ini -> /etc/php/8.1/mods-available/xml.ini
lrwxrwxrwx 1 root root   40 Aug 30 21:08 20-calendar.ini -> /etc/php/8.1/mods-available/calendar.ini
lrwxrwxrwx 1 root root   37 Aug 30 21:08 20-ctype.ini -> /etc/php/8.1/mods-available/ctype.ini
lrwxrwxrwx 1 root root   36 Aug 30 21:30 20-curl.ini -> /etc/php/8.1/mods-available/curl.ini
lrwxrwxrwx 1 root root   35 Aug 30 21:08 20-dom.ini -> /etc/php/8.1/mods-available/dom.ini
lrwxrwxrwx 1 root root   36 Aug 30 21:08 20-exif.ini -> /etc/php/8.1/mods-available/exif.ini
lrwxrwxrwx 1 root root   35 Aug 30 21:08 20-ffi.ini -> /etc/php/8.1/mods-available/ffi.ini
lrwxrwxrwx 1 root root   40 Aug 30 21:08 20-fileinfo.ini -> /etc/php/8.1/mods-available/fileinfo.ini
lrwxrwxrwx 1 root root   35 Aug 30 21:08 20-ftp.ini -> /etc/php/8.1/mods-available/ftp.ini
lrwxrwxrwx 1 root root   34 Aug 30 21:30 20-gd.ini -> /etc/php/8.1/mods-available/gd.ini
lrwxrwxrwx 1 root root   39 Aug 30 21:08 20-gettext.ini -> /etc/php/8.1/mods-available/gettext.ini
lrwxrwxrwx 1 root root   37 Aug 30 21:08 20-iconv.ini -> /etc/php/8.1/mods-available/iconv.ini
lrwxrwxrwx 1 root root   39 Aug 30 21:30 20-imagick.ini -> /etc/php/8.1/mods-available/imagick.ini
lrwxrwxrwx 1 root root   40 Aug 30 21:08 20-mbstring.ini -> /etc/php/8.1/mods-available/mbstring.ini
lrwxrwxrwx 1 root root   38 Aug 30 21:08 20-mysqli.ini -> /etc/php/8.1/mods-available/mysqli.ini
lrwxrwxrwx 1 root root   41 Aug 30 21:08 20-pdo_mysql.ini -> /etc/php/8.1/mods-available/pdo_mysql.ini
lrwxrwxrwx 1 root root   36 Aug 30 21:08 20-phar.ini -> /etc/php/8.1/mods-available/phar.ini
lrwxrwxrwx 1 root root   37 Aug 30 21:08 20-posix.ini -> /etc/php/8.1/mods-available/posix.ini
lrwxrwxrwx 1 root root   40 Aug 30 21:08 20-readline.ini -> /etc/php/8.1/mods-available/readline.ini
lrwxrwxrwx 1 root root   37 Aug 30 21:08 20-shmop.ini -> /etc/php/8.1/mods-available/shmop.ini
lrwxrwxrwx 1 root root   41 Aug 30 21:08 20-simplexml.ini -> /etc/php/8.1/mods-available/simplexml.ini
lrwxrwxrwx 1 root root   39 Aug 30 21:08 20-sockets.ini -> /etc/php/8.1/mods-available/sockets.ini
lrwxrwxrwx 1 root root   36 Aug 30 21:30 20-ssh2.ini -> /etc/php/8.1/mods-available/ssh2.ini
lrwxrwxrwx 1 root root   39 Aug 30 21:08 20-sysvmsg.ini -> /etc/php/8.1/mods-available/sysvmsg.ini
lrwxrwxrwx 1 root root   39 Aug 30 21:08 20-sysvsem.ini -> /etc/php/8.1/mods-available/sysvsem.ini
lrwxrwxrwx 1 root root   39 Aug 30 21:08 20-sysvshm.ini -> /etc/php/8.1/mods-available/sysvshm.ini
lrwxrwxrwx 1 root root   41 Aug 30 21:08 20-tokenizer.ini -> /etc/php/8.1/mods-available/tokenizer.ini
lrwxrwxrwx 1 root root   41 Aug 30 21:08 20-xmlreader.ini -> /etc/php/8.1/mods-available/xmlreader.ini
lrwxrwxrwx 1 root root   41 Aug 30 21:08 20-xmlwriter.ini -> /etc/php/8.1/mods-available/xmlwriter.ini
lrwxrwxrwx 1 root root   35 Aug 30 21:08 20-xsl.ini -> /etc/php/8.1/mods-available/xsl.ini

  • Re-check Virtualmin Configuration I used System Settings → Re-Check Configuration and it shows:

The status of your system is being checked to ensure that all enabled features are available and properly configured …

Your system has 3.72 GiB of memory, which is at or above the Virtualmin recommended minimum of 256 MiB

BIND DNS server is installed

Mail server Postfix is installed and configured

Postfix is configured to support per-domain outgoing IP addresses

Apache is installed

CGI scripts can be executed using suEXEC or FCGIwrap

Apache supports HTTP/2 on your system

The following PHP execution modes are available : cgi fcgid fpm

The following PHP versions are available : 8.1.2 (/bin/php-cgi8.1)

The following PHP-FPM versions are available : 8.1.2 (php8.1-fpm)

Apache is configured to host SSL websites

MySQL 8.0.34-0ubuntu0.22.04.1 is installed and running

Logrotate is installed

SpamAssassin and Procmail are installed and configured for use

Plugin AWStats reporting is installed

Plugin Protected web directories is installed

Plugin Virtualmin Support is installed

Using network interface eth0 for virtual IPs

IPv6 addresses are available, using interface eth0

Default IPv4 address for virtual servers is 5.78.66.2

Default IPv6 address for virtual servers is 2a01:4ff:1f0:e512::1

Quotas are not enabled on the filesystem / which contains home directories under /home and email files under /home. Quota editing has been disabled

All commands needed to create and restore backups are installed

Resource limits are supported and configured correctly

The selected package management and update systems are installed

Chroot jails are available

The Virtualmin APT repository is configured correctly

… your system is ready for use by Virtualmin

  • switch execution modes away from PHP-FPM and back

First this:

image
Next this:

Finally, when I visit my site, I still see "File not found. " in the browser and the AH01071 error in apache_error_log

What are my next steps? Thank you again for your patience.

One more thing…

I just checked, and the old-host.com was configured for mod_php. So you’re right about it being on the old system.

Does the current config file (I posted it in "File not found" and AH01071 for Wordpress/PHP server) contain any remnants of mod_php? Thanks again.

PS I’m not mad or upset. My servers are still running on the old-host.com, so there’s no crisis. Thanks.