• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • 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.

PHP Handler on the default IP

ilijamt

Basic Pleskian
Hello

I wanted to ask if there is a way to attach a PHP handler on the the default/shared IP address, without selecting a default domain for it?

On the dedicated IP addresses it works, but on the shared IP address, no.

On Plesk 12.0.8, it worked as there was a Apache2 PHP module enabled, but it's disabled because of Apache2.4.

I can always add a proxy pass in /etc/apache2/plesk.conf.d/server.conf, but the changes are overwritten on configuration generation

Code:
<IfModule mod_proxy_fcgi.c>
    ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/vhosts/default/htdocs
</IfModule>

Plesk Version
Code:
Product version: 12.5.30 Update #7
    Update date: 2015/10/20 21:48
     Build date: 2015/08/26 19:00
     OS version: Debian 8.2
       Revision: 344620
   Architecture: 64-bit
Wrapper version: 1.2
 
Hi ilijamt,

you could consider to use a custom template at "/usr/local/psa/admin/conf/templates/custom/domain/" ( for Debian/Ubuntu you would use the path "/opt/psa/admin/conf/templates/custom/domain/" ).

The only template where "<IfModule mod_proxy_fcgi.c>" is used at the default templates is "../psa/admin/conf/templates/default/domain/domainVirtualHost.php".
Code:
...
<?php if ($VAR->domain->physicalHosting->php && 'fpm' == $VAR->domain->physicalHosting->phpHandlerType): ?>
<IfModule mod_proxy_fcgi.c>
    ProxyPassMatch ^/(.*\.php(/.*)?)$ <?php echo $VAR->domain->physicalHosting->fpmSocket ?>|fcgi://127.0.0.1:9000<?php echo $OPT['ssl'] ? $VAR->domain->physicalHosting->httpsDir : $VAR->domain->physicalHosting->httpDir ?>

</IfModule>
<?php endif; ?>
...
Consider to create your custom template and modify it to your needs. Plesk will not override custom templates in case of updates/upgrades/patches and will use them instead of the default template.


To be sure, that the only template for "<IfModule mod_proxy_fcgi.c>" is "domainVirtualHost.php", I used the command:

For CentOS/RHEL - based systems:
grep -rnw '/usr/local/psa/admin/conf/templates' -e "<IfModule mod_proxy_fcgi.c>"

For Debian/Ubuntu - based systems:
grep -rnw '/opt/psa/admin/conf/templates' -e "<IfModule mod_proxy_fcgi.c>"
 
Last edited by a moderator:
Back
Top