• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved One domain downloads php files instead of executing them

Mike_CX

New Pleskian
Hello,

I got a problem with a domain on Plesk 12.5.
When I try to open a php file which is hosted on a particular domain (and only there!) my browser offers me to download the file. Other domains inside the same subscription and other domains on other subscriptions are not affected, it's only on this one domain. PHP is activated for this domain, and always was and worked until now, so this seems a little strange.
I already tried to fix it by running the following command:
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain mydomain.com

The httpd.conf which belongs to the domain (in the conf folder next to the httpdocs and log folders) changed in size and date, so I think Plesk did something to the config. After restarting the Apache service (I think this is necessary after modifying a httpd.conf file, isn't it?) I tried it again and nothing changed, php files still are offered to be downloaded.

As I am new to Plesk I don't have any idea what else I could to, i.e. which config files I could check. I want to avoid setting up the whole subscription from scratch as there are a lot of email accounts and other domains (that forward to this one) involved which I would have to recreate then. Or is it possible to back up only the email and domain stuff and restore it after the domain is recreated?

Thanks for your help!

Regards, Mike
 
Which php handler is used for this domain? 'FPM application served by Apache' of something else? Have you tried to change handler? Any results?
 
Hello Igor,

thanks for your reply.
The handler is set to FPM. I switched it to fastCGI, restarted Apache and: it worked!
Then I switched back to FPM, restarted Apache again and tried it again: problem comes back
So there seems a problem with FPM for this domain, as all other domains run fine with FPM.
Can I run into any problems when I leave it at fastCGI, or is there even a solution how FPM for this domain can be fixed?
Thanks!

Regards, Mike
 
Make sure that proxy_fcgi_module and proxy_module are enabled and loading by apache. You can check it with following command:

# apachectl -M | grep -E 'proxy_module|proxy_fcgi'
 
Hello Igor,

I get the following output:
proxy_module (shared)
proxy_fcgi_module (shared)

What can I do next?
Thanks!
 
Hello Igor,

I can find the section with <IfModule mod_proxy_fcgi.c> in the httpd.conf twice and it looks the same (of course the domain name differs).
When running plesk sbin httpd_modules_ctl -s | grep proxy_fcgi proxy_fcgi on I get:
grep: proxy_fcgi: No such file or directory
grep: on: No such file or directory

Do I have to run this in a particular folder?

When checking for custom templates I get an error that the specified path doesn't exist, so I think there are no custom templates.

The command apt-get check doesn't show any errors:
Reading package lists... Done
Building dependency tree
Reading state information... Done
 
When running plesk sbin httpd_modules_ctl -s | grep proxy_fcgi proxy_fcgi on I get:
grep: proxy_fcgi: No such file or directory
grep: on: No such file or directory
There is mistake in command. Use:

# plesk sbin httpd_modules_ctl -s | grep 'proxy_fcgi on'
 
Hello,

I resolved a similar problem by running:
Code:
/usr/local/psa/admin/sbin/autoinstaller --select-release-current --upgrade-installed-components

This upgraded the following packages:
libapache2-mod-proxy-psa plesk-mail-pc-driver psa-phpfpm-configurator
 
The fact that this can just start happening by itself on autoupgrade is a huge security vulnerability

Users can download all the sensitive files once apache is in this broken state including .env, wp-config.php
 
Back
Top