Apache + FPM load balancer CFG problems.

226 views
Skip to first unread message

Renzo Racioppi

unread,
May 23, 2013, 3:39:19 AM5/23/13
to highloa...@googlegroups.com
I'm having some problems with apache virtualhosts (vhosts scripts are set in "/home/vhosts/$VHOST")...

<VirtualHost *:80>
ServerName www.site.com
ErrorLog "logs/www.site.com-error_log"
CustomLog "logs/www.site.com-access_log" common
</VirtualHost>

This configuration works, when apache receives a request for domain "www.site.com" it will forward it to 192.168.56.202 backendserver and this server finds the proper script at "/home/vhosts/www.site.com". 

My problems are concerning load balancing. My configuration is:

<VirtualHost *:80>
ServerName www.site.com
<Proxy balancer://site>
BalancerMember fcgi://192.168.56.204:9001
BalancerMember fcgi://192.168.56.203:9001
</Proxy>
ProxyPass / balancer://site/
ErrorLog "logs/www.site.com-error_log"
CustomLog "logs/www.site.com-access_log" common
</VirtualHost>

But it is not working: requests will be forwarded to those backends, but I can't figure out how to make those BalancerMember backends to point at "/home/vhosts/www.site.com".
How should I do that? 

Renzo Racioppi

unread,
May 23, 2013, 3:40:52 AM5/23/13
to highloa...@googlegroups.com
I tried to add the path info to both proxypass and balancermember but with no results.

Anatoly Pashin

unread,
May 23, 2013, 5:09:47 AM5/23/13
to highloa...@googlegroups.com
ProxyPass / balancer://site/
ProxyPass / balancer://site//home/vhosts/www.site.com/


2013/5/23 Renzo Racioppi <hellf...@gmail.com>
I tried to add the path info to both proxypass and balancermember but with no results.

--
 
---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Пашин Анатолий,
эникейщик.

Renzo Racioppi

unread,
May 23, 2013, 5:23:04 AM5/23/13
to highloa...@googlegroups.com
It did not work. I noticed also that for balancermembers, also ping and status page do not work... All errors I had are: "AH01071: Got error 'Primary script unknown\n'"

Jérôme Loyet

unread,
May 23, 2013, 6:21:25 AM5/23/13
to highloa...@googlegroups.com
stop using apache and using nginx instead ... :-(


2013/5/23 Renzo Racioppi <hellf...@gmail.com>
It did not work. I noticed also that for balancermembers, also ping and status page do not work... All errors I had are: "AH01071: Got error 'Primary script unknown\n'"

--

Renzo Racioppi

unread,
May 24, 2013, 5:58:28 AM5/24/13
to highloa...@googlegroups.com
He had my balancer problem and he published a "naive" patch which was not set in php retail release.  I'll recompile with that patch and see what will happen. If this goes wrong too I'll move to nginx. Is Nginx + FPM with LB and virtualhost a popular solution?

Jérôme Loyet

unread,
May 24, 2013, 6:07:37 AM5/24/13
to highloa...@googlegroups.com
I don't know if it's popular (I bet it is) but it works like a charm and is production ready. I'm using it for site generating several gbps without any problem.

++ Jerome


2013/5/24 Renzo Racioppi <hellf...@gmail.com>
--

Renzo Racioppi

unread,
May 24, 2013, 6:42:40 AM5/24/13
to highloa...@googlegroups.com
Ok, that patch worked but result page does not load img resources...

Vid Luther

unread,
May 24, 2013, 9:54:26 AM5/24/13
to highload-php-en
All we use is nginx + php-fpm.. 

nginx runs as a reverse proxy load balancer to other nginx servers which talk to php-fpm. 
--
Vid Luther
CEO and Founder
ZippyKid
Managed Wordpress Hosting
http://zippykid.com/
210-789-0369
Reply all
Reply to author
Forward
0 new messages