Re: Redirect question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



James,

In my configuration I've setup several ips on the same machine. As far as I understand it, the ip1 address in <VirtualHost ip1:80> is the ip apache sends the request on, and not the ip which the user is using while viewing your page.

<VirtualHost ***.***.***.38:80>
  ServerAdmin webmaster@xxxxxxxxxxx
  DocumentRoot /home/httpd/riskanalyticsinc/ramain
  ServerName my-host
  JkMount /*.xsp ajp13
  JkMount /*.xxsp ajp13
  JkMount /*.xml ajp13
  Alias /clients "/home/httpd/riskanalyticsinc/clients"
  Alias /ramain "/home/httpd/riskanalyticsinc/ramain"
</VirtualHost>

<VirtualHost ***.***.***.40:80>
  ServerAdmin webmaster@xxxxxxxxxxx
  DocumentRoot /home/httpd/ipfscorp/ipfscorp
  ServerName my-host2
  JkMount /*.xsp ajp13
  JkMount /*.xxsp ajp13
  JkMount /*.xml ajp13
  Alias /jag "/home/httpd/ipfscorp/jag"
  Alias /ipfscorp "/home/httpd/ipfscorp/ipfscorp"
</VirtualHost>

In my configuration I have two different server names, if you access http://my-host2 you access ip ***.***.***.40 .
To achieve this setup, I've created several eth ip's on this same machine.

I'm not an apache expert, but this is my understanding of how it all works together.

Sincerely,
-Rachel

James Sherwood wrote:
Hello,

The tomcat5 worker goes to another server in which I changed the code for the test page so it is different from the loadbalancer worker.

Then a coworker has that ip and views the page. The page he sees is the same page I see from a different ip.

Am I doing something wrong?

--James


----- Original Message ----- From: "Rachel Barrios" <rbarrios@xxxxxxxxxxxxxxxxxx>
To: <users@xxxxxxxxxxxxxxxx>
Sent: Friday, September 21, 2007 12:19 PM
Subject: Re:  Redirect question


Hi,

How are you verifying that you have two different sets of information coming in? Ie. how do you know that one test came in on your first ip address and that a second test came in on a different one?

Sincerely,
-Rachel

James Sherwood wrote:
Hello,

Ok to my understanding if i have the vhosts:

<VirtualHost 74.115.246.12:80>
ServerAdmin jsherwood@xxxxxxxxxxxxxxxx
DocumentRoot "E:/Programs/Apache/Apache2/htdocs/wmm"
ServerName www.somewhere.com
ServerAlias somewhere.com
JkMount /* tomcat5
ErrorLog E:/Programs/Apache/Apache2/logs/wmm-error_log
CustomLog E:/Programs/Apache/Apache2/logs/wmm-access_log combined
</VirtualHost>



<VirtualHost *>
ServerAdmin jsherwood@xxxxxxxxxxxxxxxx
DocumentRoot "E:/Programs/Apache/Apache2/htdocs/wmm"
 ServerName www.somewhere.com
ServerAlias somewhere.com
JkMount /* loadbalancer
ErrorLog E:/Programs/Apache/Apache2/logs/wmm-error_log
CustomLog E:/Programs/Apache/Apache2/logs/wmm-access_log combined
</VirtualHost>


Anyone going to www.somewhere.com on the IP 74.115.246.12 would be sent to tomcat5 and everyone else going to www.somewhere.com would be sent to loadbalancer.

It does not work this way so am I mistaken?

Thanks,
James



----- Original Message ----- From: "Rachel Anderson-Barrios" <rbarrios@xxxxxxxxxxxxxxxxxx>
To: <users@xxxxxxxxxxxxxxxx>
Sent: Monday, September 17, 2007 12:45 PM
Subject: Re:  Redirect question


I'm not sure if this is what you mean or not, but you can redirect to
pseudo ip addresses on the same machine.

<VirtualHost ***.***.***.38:80>
   ServerAdmin webmaster@xxxxxxxxxxx
   DocumentRoot /home/httpd/riskanalyticsinc/ramain
   ServerName my-host
   JkMount /*.xsp ajp13
   JkMount /*.xxsp ajp13
   JkMount /*.xml ajp13
   Alias /clients "/home/httpd/riskanalyticsinc/clients"
   Alias /ramain "/home/httpd/riskanalyticsinc/ramain"
</VirtualHost>

<VirtualHost ***.***.***.40:80>
   ServerAdmin webmaster@xxxxxxxxxxx
   DocumentRoot /home/httpd/ipfscorp/ipfscorp
   ServerName my-host2
   JkMount /*.xsp ajp13
   JkMount /*.xxsp ajp13
   JkMount /*.xml ajp13
   Alias /jag "/home/httpd/ipfscorp/jag"
   Alias /ipfscorp "/home/httpd/ipfscorp/ipfscorp"
</VirtualHost>

We have both hosts using the same workers "ajp13" but could specify them
here to use different ones.  Both VirtualHost elements are in the same
http.conf file.

Hope that helps,
-Rachel


On Sat, 2007-09-15 at 21:50, James Sherwood wrote:
Hello,

We use mod_jk with apache and tomcat.

Is there a way to redirect requests to a certian worker via their ip range?

Thanks in advance,
James

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


__________ NOD32 2534 (20070917) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


__________ NOD32 2543 (20070921) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux