• 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.

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