Question about PHP-FPM and ProxyPass Apache

77 views
Skip to first unread message

156281

unread,
Apr 25, 2017, 1:40:01 AM4/25/17
to highloa...@googlegroups.com
Greetings all,

I'm running Centos 7 webserver with Apache 2.4 and PHP-FPM.  

I'm setting up MediaGoblin instance for file pictures.  My question is one regarding ProxyPass, or how to connect. 

I'm running php-fpm on the standard port, 127.0.0.1:9000.  

The instance of Mediagoblin is running on port 127.0.0.1:26543.  

In the docs, I need to set up this so that the proxy connects to php-fpm.  

I have successfully connected to it using nginx, so I know that it is my lack of understanding about how to get apache to connect to the php-fpm server.  The settings for nginx is:


 # Mounting MediaGoblin itself via FastCGI.
 location / {
    fastcgi_pass 127.0.0.1:26543;
    include /etc/nginx/fastcgi_params;

    # our understanding vs nginx's handling of script_name vs
    # path_info don't match :)
    fastcgi_param PATH_INFO $fastcgi_script_name;
    fastcgi_param SCRIPT_NAME "";
 }

I'm having trouble understanding how the apache server should talk with php-fpm.  I've checked both the RedHat docs as well as the apache wiki, I've tried several methods..

I've tried:
	ProxyPass "/" "fcgi:127.0.0.1:26543"
	but this leads to infinite redirects.

Also tried:
	ProxyPass "/" "fcgi:127.0.0.1:9000"
	this leads to the file not found, when I add the directory at the end, I get access denied.


The structure is that my files reside in
DocumentRoot /srv/mediagoblin
ProxyPass...

If anyone has any other ideas, I would really appreciate the help.

TIA
Reply all
Reply to author
Forward
0 new messages