2

I found this article teaching how to create two different php-fpm pools from magento frontend and backend using nginx.

My question is: is it possible to do this using Apache2?

Thanks in advance.

1 Answer 1

3

sure

you just read how it works in here: https://httpd.apache.org/docs/2.4/mod/mod_proxy_fcgi.html

then in apache frontend vhost config you add something like this:

<VirtualHost 1.2.3.4:443>
    ServerName example.com
    ServerAlias www.example.com

    DocumentRoot /home/example/public_html/ 

<IfModule proxy_fcgi_module>
    <FilesMatch \.(phtml|php)$>
            SetHandler "proxy:fcgi://127.0.0.1:9000"
    </FilesMatch>
</IfModule>

then in apache backend vhost config you add something like this:

  <VirtualHost 4.3.2.1:443>
    ServerName admin.example.com

    DocumentRoot /home/example/public_html/

<IfModule proxy_fcgi_module>
    <FilesMatch \.(phtml|php)$>
            SetHandler "proxy:fcgi://127.0.0.1:9001"
    </FilesMatch>
</IfModule>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.