PHP-FPM Proxy to another server

Checkmate

Verified User
Joined
Nov 11, 2011
Messages
5
Hello,

I only host a single site on it. Directadmin save me to the time to recompile, auto security update and so on. Anyway, since I host a very large site, it become necessary that proxying through another php-fpm instance located on another server are required. This could be achieved by a small HAProxy that handle the round robin proxy selection through 127.0.0.1

Understandable, the Apache vhost config use a fpm socket from SetHandler directive:
Code:
        <FilesMatch "\.(inc|php|phtml|phps|php56)$">
                AddHandler "proxy:unix:/usr/local/php56/sockets/<user>.sock|fcgi://localhost" .inc .php .phtml .php56
        </FilesMatch>
        <FilesMatch "\.(inc|php|phtml|phps|php70)$">
                AddHandler "proxy:unix:/usr/local/php70/sockets/<user>.sock|fcgi://localhost" .php70
        </FilesMatch>

I understand that I should not edit the usevhost conf file directly as they could be auto re-generated to directadmin. What's the right way to edit these value?
 
Back
Top