Proxy error DNS lookup with Addhandler and pph-fpm56?

Pzz

Verified User
Joined
May 20, 2013
Messages
135
Location
The Hague area, The Netherlands
On a new domain (restore from an other server) I get a:

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /index.php.

Reason: DNS lookup failure for: php-fpm56.esther

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

A domain owned by ADMIN works fine. I checked the /usr/local/directadmin/data/users/esther/httpd.conf and I I found AddHandler "proxy:fcgi://php-fpm56.esther" in the conf, as shown below. I guess this has to do be related because of the use of the exact string in the error : "php-fpm56.esther".

ServerName www.niwik.nl
ServerAlias www.niwik.nl niwik.nl
ServerAdmin [email protected]
DocumentRoot /home/esther/domains/niwik.nl/public_html
SetEnv PHP_INI_SCAN_DIR /usr/local/directadmin/data/users/esther/php/
UseCanonicalName OFF
<IfModule !mod_ruid2.c>
SuexecUserGroup esther esther
</IfModule>
CustomLog /var/log/httpd/domains/niwik.nl.bytes bytes
CustomLog /var/log/httpd/domains/niwik.nl.log combined
ErrorLog /var/log/httpd/domains/niwik.nl.error.log
<FilesMatch "\.(inc|php|phtml|phps|php56)$">
AddHandler "proxy:fcgi://php-fpm56.esther" .inc .php .phtml .php56
</FilesMatch>
<Directory /home/esther/domains/niwik.nl/public_html>
AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,Includes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None
Options -ExecCGI
</Directory>

Is this a permission problem for rhis user (esther)?

Extra info CentOS 7, Apache 2.4.10, php 5.6.2 with fpm
 
Last edited:
Are you running DA 1.46.3? Do you have any custom templates on your system?
 
It works now. And thanks to Martynas for putting me on the right track.

Yes: I had a custom template (DA 1.46.2(?) I think) and the templates changed in DA 1.46.3 (which I use).

I removed the custom template, generated a new httpd.conf and it works.

But what wondered me was why my in DA 1.46.2 generated confs domains still worked and the the new one didn't, using the same (and wrong 1.46.2 templates).

I figured this out (correct me if I'm wrong):
In 1.46.2 the code
<Proxy "unix:/usr/local/php56/sockets/ruben.sock|fcgi://php-fpm56.ruben/">
ProxySet min=0
</Proxy>
was in the first line of every httpd.conf and in 1.46.3 not any more. I think this element got replaced by the change of the AddHandler-line.

I overlooked the changes in the templates...
 
Yes, that must have been the problem, because you had virtual_host2.conf customized, but not user_virtual_host.conf. When user_virtual_host.conf changed, you missed the needed proxy config for virtual_host2.conf. Having both user_virtual_host.conf & virtual_host2.conf in custom/ folder would have prevented the issue :)
 
Yes, but user_virtual_host.conf had a part of code needed for PHP-FPM to work. That was changed in 1.46.3, so that virtual_host2*.conf files wouldn't depend on user_virtual_host.conf at all when using PHP-FPM.
 
Back
Top