Hi everyone,
I'm migrating a custom PHP web application to a server running Plesk with Apache and PHP-FPM enabled.
The issue is that when I access the site, instead of executing the PHP files, the browser either downloads the .php files or displays their raw source code as plain text.
Still, PHP files are not being executed. They either get downloaded or shown as plain text in the browser.
What else could prevent Apache from parsing PHP files, even though PHP is active and correctly configured?
Could it be a missing VirtualHost directive or something in Plesk’s internal configuration?
I'm migrating a custom PHP web application to a server running Plesk with Apache and PHP-FPM enabled.
The issue is that when I access the site, instead of executing the PHP files, the browser either downloads the .php files or displays their raw source code as plain text.
What I've already done:
- PHP 7.4.33 is installed and active on the server
- Apache has the php7_module enabled (verified with apache2ctl -M)
- PHP handler is set to: FPM application served by Apache in Plesk
- Project files are placed under /httpdocs
- In Plesk settings, “Serve static files directly by nginx” is disabled
- .htaccess is clean, with only a basic rewrite rule to route everything to index.php
Still, PHP files are not being executed. They either get downloaded or shown as plain text in the browser.
My question is:
What else could prevent Apache from parsing PHP files, even though PHP is active and correctly configured?
Could it be a missing VirtualHost directive or something in Plesk’s internal configuration?