Re: How to select the directory index file for load balancing?
Theo Schlossnagle <[email protected]> Wed, 29 Oct 2003 09:23:21 -0500
| Newsgroups | gmane.comp.apache.mod-backhand.general |
|---|---|
| Message-ID | <[email protected]> |
I'm just fishin' here... But I think it has to do with the way mod_backhand handles apache internal subrequests. mod_backhand will only try to load balance things that are initial requests. Here, the initial request is / and then it is expanded with DirectoryIndex to /index.php which is issues into apache as an internal sub request, which mod_backhand will not attempt to load balance. This behaviour was selected to allow mod_backhand to peacefully coexist with modules like mod_gzip. One way is to work around this is to use mod_rewrite. I think you can rewrite all / to index.php with a 302 and that will work like a charm. If that isn't a desirable approach, then someone more clever than me can try to change mod_backhand to handle subrequests too... On Oct 29, 2003, at 9:08 AM, Thomas Buehren wrote: > Hello again, > > having read the mail of Bryan Ross who also has problems with the > DirectoryIndex, I wonder if my problem of how to load balance the > directory > index file might result from a mod_backhand error: > > This works with the directory index file index.php (http://DOMAINNAME/ > returns a 403 forbidden): > > <Directory "/usr/local/httpd/htdocs/genieuk"> > <Files ~ "(\.php3|\.php)$"> > Order allow,deny > Deny from all > </Files> > </Directory> > > So, the Files statement seems to include my index.php directory index > file. > BUT this does not work with index.php (http://DOMAINNAME/index.php is > load > balanced, but http://DOMAINNAME/ is always executed on the original > server): > > <Directory "/usr/local/httpd/htdocs/genieuk"> > <Files ~ "(\.php3|\.php)$"> > Backhand byAge > Backhand byRandom > Backhand byLoad -3.0 > </Files> > </Directory> > > Does anyone know how to enable load balancing for http://DOMAINNAME/? > > Thomas > > >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]]On Behalf Of Thomas >> Buehren >> Sent: Sunday, October 26, 2003 1:25 PM >> >> Hello, >> >> probably a simple question for you, but I could not find a solution: >> >> I use backhand to load-balance php requests. All the rest should be >> processed by the original server. The "Files" selection in the >> configuration >> below does that for me. >> >> The problem: The directory index file "index.php" is not load >> balanced if >> the request is "http://DOMAINNAME/", it only works as >> "http://DOMAINNAME/index.php". How can I modify the selection (or add >> another) to capture the directory index php file when it is not >> given in the >> URL? (Apache/1.3.20 mod_backhand/1.2.0) >> >> I would be grateful for any help. >> >> Thomas >> >> >> DirectoryIndex index.jsp index.php3 index.html index.htm >> >> <VirtualHost IPADDRESS:80> >> ServerAdmin [email protected] >> DocumentRoot /usr/local/httpd/htdocs/genieuk >> ServerName DOMAINNAME >> >> ErrorLog "|rotatelogs >> /usr/local/httpd/htdocs/genieuk/stats/error_log >> 86400" >> CustomLog "|rotatelogs >> /usr/local/httpd/htdocs/genieuk/stats/access_log >> 86400" combined >> >> AddType application/x-httpd-php .php3 >> <Directory "/usr/local/httpd/htdocs/genieuk"> >> <Files ~ "(\.php3|\.php)$"> >> Backhand byAge >> Backhand byRandom >> Backhand byLoad -3.0 >> </Files> >> </Directory> >> </VirtualHost> > > > _______________________________________________ > backhand-users mailing list > [email protected] > http://lists.backhand.org/mailman/listinfo/backhand-users > // Theo Schlossnagle // Principal Engineer -- http://www.omniti.com/~jesus/ // Postal Engine -- http://www.postalengine.com/ // Ecelerity: fastest MTA on earth