Load Balancing / fastCGI

Apache, Lighttpd, nginx, Cherokee
Post Reply
oezgueng
 

Load Balancing / fastCGI

Post by oezgueng »

Hi,

ich versuche grad seit 2 Stunden den Load Balancing von fastCGI
einzurichten.

Zurzeit habe ich zwei Server.
Nun habe ich dies folgendes in der Config auf den Servern:

Server 1 (IP: 192.168.1.5):
fastcgi.server = ( ".php" =>
(( "host" => "127.0.0.1", "port" => 1026 )
( "host" => "192.168.1.6", "port" => 1026, ))
)

Server 2 (IP: 192.168.1.6)
fastcgi.server = ( ".php" =>
(( "host" => "127.0.0.1", "port" => 1026 )
( "host" => "192.168.1.5", "port" => 1026, ))
)

Ist dies eigentlich möglich?
Ich habe dies mal so ausprobiert, aber auf dem Server 1 kommt dies, wenn
ich eine Datei aufrufe: No input file specified.

Weiss jemand eine Lösung zu diesem Problem?

Gruss
oezgueng
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Load Balancing / fastCGI

Post by Joe User »

Zum Loadbalancing müssen die Directiven global (ausserhalb der vHosts) deklariert werden.
http://www.lighttpd.net/documentation/fastcgi.html
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
oezgueng
 

Re: Load Balancing / fastCGI

Post by oezgueng »

also
wenn ich dies beim host1 eingebe:

Code: Select all

www1:~#  /home/_USER_/php5/bin/php -connect host2:1026 go.php
Status: 404
Content-type: text/html
X-Powered-By: PHP/5.0.4

No input file specified.
www1:~#
und das beim host2:

Code: Select all

www2:~#  /home/_USER_/php5/bin/php  -connect host1:1026 go.php
Interactive mode enabled

Status: 404
Content-type: text/html
X-Powered-By: PHP/5.0.3

No input file specified.
www2:~#
go.php beeinhaltet:
<?php echo("test"); ?>

Weiss vielleicht einer, eine Lösung wegem "No input file specified"?
Starten tu ich php mit:
spawn-fcgi -f /home/_USER_/php5/bin/php -p 1026
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: Load Balancing / fastCGI

Post by Roger Wilco »

PHP unterstützt keinen parameter namens -connect.
oezgueng
 

Re: Load Balancing / fastCGI

Post by oezgueng »

Code: Select all

www1:~# /home/_USER_/php5/bin/php -v
PHP 5.0.4 (cgi-fcgi) (built: May  6 2006 11:35:37)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies
www1:~#
es ist ein cfg-fcgi.
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: Load Balancing / fastCGI

Post by Roger Wilco »

Deswegen gibt es trotzdem keinen Parameter namens connect.
oezgueng
 

Re: Load Balancing / fastCGI

Post by oezgueng »

okay :D

aber wie kommt es dass bei lighttpd immer "No input file specified." kommt?
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Load Balancing / fastCGI

Post by Joe User »

Der Webserver, in Deinem Fall Lighttpd, kommt bei einem Commandline-Aufruf gar nicht zum Zug. RTFM hilft...
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
oezgueng
 

Re: Load Balancing / fastCGI

Post by oezgueng »

ich hab schon alles nachgeprüft... manche sagen es sei "broken-scriptname" schuld oder sonst was... ich komm einfach nicht weiter...
me-myself-and-i
Posts: 21
Joined: 2006-05-08 13:34
 

Re: Load Balancing / fastCGI

Post by me-myself-and-i »

wie wäre es den mal mit einer suche "von unten"

läuft der fast-cgi server und lauscht auch an den entsprechenden ports und ip's ? (netstat -l)

wenn ja, darf der andere server da drauf (host allow, firewall ?)

werden die fast-cgi server nur vom lighty gespawned oder einzeln ?

ansonsten hilft der link von joe user, anders habe ich es auch nicht (wirklich) gemacht ...
Post Reply