Question : Apache configuration question

Hi,

Is it possible to make a conditional ProxyPass ProxyReverse, based on client IP?
for example now I have this configuration:

1:
2:
3:
ProxyPass /myapp http://web1/myapp
ProxyPassReverse /myapp http://web1/myapp


I want to make something like this

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
if IP from 192.168.0.1 192.168.0.2
{
   ProxyPass /myapp http://web1/myapp
   ProxyPassReverse /myapp http://web1/myapp
}
else (all other IP adresses)
{
   ProxyPass /myapp http://web2/myapp
   ProxyPassReverse /myapp http://web2/myapp
}

Answer : Apache configuration question

File are sequential so unless the lines are FIXED WIDTH in length and you can calculate the byte offset of XXX line number, then your only option is to COUNT line by line one at a time or by reading in "chunks" and splitting on carriage return/line feed.  Either option still requires you to physically count the lines until you reach the target.
Random Solutions  
 
programming4us programming4us