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

Question proxy_pass php

andyxyz

Basic Pleskian
Hi all,

This is driving me CRAZY!!

I am trying to use the following to proxy off a sub folder eg example.co.uk/blog to wordpress on wordpress.example.co.uk

location /blog {
proxy_pass http://wordpress.example.co.uk/;
}

text / image / html / work fine

however, any php file does not work and it looks like nginx tries to process php locally

[crit] 24184#0: *67578 connect() to unix:///var/www/vhosts/system/example.co.uk/php-fpm.sock failed (2: No such file or directory) while connecting to upstream

apache is off (Proxy mode disabled) so only nginx in use,

what am I missing?
 
It might not be enough to switch Apache off. You will need to set PHP to "PHP-FPM via Nginx", too. Else, .php-requests will be forwarded to Apache. As Apache is not acitve, this fails and causes the "error connecting to upstream" that you are seeing. The setting needs to be done even if you are not processing PHP on your local server. The key is that .php traffic must not be filtered out by Nginx and directed to the (missing) Apache server before the location rule is reached.

Edit: Another solution might be to turn off PHP completely. It won't be served by your Plesk system anyway but by the external system. Whether this is a good solution depends on whether you need PHP on your local web space for other directories or not.
 
sorry.. should have said.. yes php is set to be managed by nginx (they recently fixed the bug where turning apache off would cause a error if you left php running as apache.. now turning off proxy automatically sets php to nginx also which is cool)

Disabling php is an interesting idea.. however, it had no effect (other than to change the error)

503 GET /blog/php.php HTTP/1.1
 
Last edited:
Back
Top