Php files downloading instead of executing

OS type and version CentOS Linux 7.9.2009
Webmin version 1.990
Virtualmin version 6.17

installed a fresh virtuallmin on centos. I use remi repos to install php 7.3 and when I tried to hit my index.php and tried to download this. lucky I recalled this problem and use the below for easy fix. But I’m curious why this is doing this… if this would hae been a bug it would have been resoled a long time ago. So does anyone know why this behavior happens? I haven’t setup any server without virtualmin for so long I don’t know if this happens with just a base linux cli installing php from remi. But would like to know.

edit /etc/httpd/conf.d/php.conf

vim edit /etc/httpd/conf.d/php.conf

with the new installations of virtualmin going with php 7.*++. The only thing I have had to do is comment out the SetHandler application/x-httpd-php

    <FilesMatch \.php$>
        #SetHandler application/x-httpd-php

You installed mod_php. Do not do that.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.