Apache shows php code instead of executing

MarioMerlo

Registered
Jan 9, 2018
3
0
1
Argentina
cPanel Access Level
Reseller Owner
Hi, I'm new at this.

I have a VPS with WMH, and today, I don't know why, all the websites I have on that VPS are showing the PHP code, instead of executing it. Any Ideas?
Thanks.
 

MarioMerlo

Registered
Jan 9, 2018
3
0
1
Argentina
cPanel Access Level
Reseller Owner
If you do use cPanel you need to select either Apache (php mod) or PHP CGi to process the php files.
I use the WHM, it's the global interface of cpanel. I have the ExecCGI activated on the Apache Global Configuration... but nothing changes. All the websites on the Virtual Server shows the code, instead of executing the PHP.
 

Infopro

Well-Known Member
May 20, 2003
17,113
511
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
I have a VPS with WMH, and today, I don't know why, all the websites I have on that VPS are showing the PHP code
Assuming you do not have access to run EasyApache 4 yourself, you should probably speak with your WebHost about this.

If you do have root access to go here:
WebHost Manager »Software »EasyApache 4

You might want to select one of the Available Profiles listed and rebuild Apache properly. Sounds to me like someone did and it didn't go well or was configured incorrectly.
 

MarioMerlo

Registered
Jan 9, 2018
3
0
1
Argentina
cPanel Access Level
Reseller Owner
Assuming you do not have access to run EasyApache 4 yourself, you should probably speak with your WebHost about this.

If you do have root access to go here:
WebHost Manager »Software »EasyApache 4

You might want to select one of the Available Profiles listed and rebuild Apache properly. Sounds to me like someone did and it didn't go well or was configured incorrectly.

Thanks for your answer. I do have access to the EasyApache 4. I've rebuilted the Apache, but it has given me an error:

The “/usr/sbin/httpd” command (process 12513) reported error number 1 when it ended.
Configuration problem detected on line 249 of file /etc/apache2/conf/httpd.conf.work.DWZumbio: : Syntax error on line 32 of /etc/apache2/conf.d/modsec2.conf: Syntax error on line 27 of /etc/apache2/conf.d/modsec/modsec2.cpanel.conf: Could not open configuration file /etc/apache2/conf.d/modsec_vendor_configs/OWASP3/crs-setup.conf: No such file or directory

Any clues?