httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PMilan...@nypl.org
Subject RE: [users@httpd] mod_rewrite
Date Fri, 28 Jan 2005 12:35:36 GMT
Seems the issue may be with how the mod handles the rewrite. Seems
strange.

 

Is there any particular reason why you went this route instead of virtual
hosts in apache?

 

In my scenario, I have 2 load balancers (hot spare) passing to a farm. The
farm is setup with virtualhosts on each real server. I have one 'live' VIP
and one 'dev' VIP. The live IP handles all production web traffic.
Essentially, the main website and about 30 others. The dev IP handles
development and staging, and also passes FTP access internally.
Performance wise, it has been non-issue. All I do to add a new site is put
in the vhost on apache, and CNAME the FQDN to the VIP.

 

BTW, if 54.28 has a real IP, why not run the server on 80? Are there other
requirements?

 

  _____  

From: mmckenzie@unmc.edu [mailto:mmckenzie@unmc.edu] 
Sent: Thursday, January 27, 2005 2:13 PM
To: users@httpd.apache.org
Subject: RE: [users@httpd] mod_rewrite

 


www.unmc.edu and www.citymatch.org both have real ips 

www.unmc.edu = 192.198.54.11 

www.citymatch.org = 192.198.54.28 

The load balancer analyzes the real ip and associates each ip with a
server pool. 

let's say we have a server pool called unmc-public-websites 

in the pool we have the ips 192.198.54.11 and 192.198.54.28 

each one of the three webservers behind the load balancer have their own
vpn ip address. 

mirror1 = 192.168.1.11 
mirror2 = 192.168.1.12 
mirror3 = 192.168.1.13 

these ips are associated with the pool as well. 

each mirror server is listening on port 80 and 8009 

The server uses a round robin approach to distributing the requests. 

If we get a request for www.unmc.edu the loadbalancer sees that the ip for
that dns is 192.198.54.11 
the loadbalancer look for a pool containing 192.198.54.11 for port 80 
it finds the unmc-public-websites pool and sends the request to one of the
mirror boxes on port 80 

the same happens for www.citymatch.org only it sends the request to one of
the mirror boxes on port 8009 




Mitchell S. McKenzie
Programmer
 <http://app1.unmc.edu/leis> Learning Environment & Internet Services
University of Nebraska Medical Center
Phone: 402-559-9306
Cell Phone: 402-708-1493

University of Nebraska Medical Center E-mail Confidentiality Disclaimer :
The information in this e-mail is privileged and confidential, intended
only for the use of the addressee(s) above.
Any unauthorized use or disclosure of this information is prohibited. 
If you have received this e-mail by mistake please delete it and
immediately contact the sender. 




PMilanese@nypl.org 

01/27/2005 12:48 PM 


Please respond to
users@httpd.apache.org


To

users@httpd.apache.org 


cc

 


Subject

RE: [users@httpd] mod_rewrite

 


 

 




Ah.. The backend is port split.. 
  
I run with vhosts. that's the difference.. 
  
How does your load balancer know what site it's getting? Are they going to
different real IPs? 
  

 

  _____  


From: mmckenzie@unmc.edu [mailto:mmckenzie@unmc.edu] 
Sent: Thursday, January 27, 2005 1:30 PM
To: users@httpd.apache.org
Subject: RE: [users@httpd] mod_rewrite 
  

yep.  no cigar. 

Mitchell S. McKenzie
Programmer
 <http://app1.unmc.edu/leis> Learning Environment & Internet Services
University of Nebraska Medical Center
Phone: 402-559-9306
Cell Phone: 402-708-1493

University of Nebraska Medical Center E-mail Confidentiality Disclaimer :
The information in this e-mail is privileged and confidential, intended
only for the use of the addressee(s) above.
Any unauthorized use or disclosure of this information is prohibited. 
If you have received this e-mail by mistake please delete it and
immediately contact the sender. 


PMilanese@nypl.org 

01/27/2005 12:26 PM 

 


Please respond to
users@httpd.apache.org

 


To

users@httpd.apache.org 


cc

  


Subject

RE: [users@httpd] mod_rewrite


  

 


  

 





Did you try that without the [R]? 
  


  

  _____  



From: mmckenzie@unmc.edu [mailto:mmckenzie@unmc.edu] 
Sent: Thursday, January 27, 2005 11:58 AM
To: users@httpd.apache.org
Subject: RE: [users@httpd] mod_rewrite 
 

Tried that. 

Didn't work. 

Mitchell S. McKenzie
Programmer
 <http://app1.unmc.edu/leis> Learning Environment & Internet Services
University of Nebraska Medical Center
Phone: 402-559-9306
Cell Phone: 402-708-1493

University of Nebraska Medical Center E-mail Confidentiality Disclaimer :
The information in this e-mail is privileged and confidential, intended
only for the use of the addressee(s) above.
Any unauthorized use or disclosure of this information is prohibited. 
If you have received this e-mail by mistake please delete it and
immediately contact the sender. 


PMilanese@nypl.org 

01/27/2005 10:48 AM 

  

 


Please respond to
users@httpd.apache.org

  

 


To

users@httpd.apache.org, apache-modules@covalent.net 


cc

  


Subject

RE: [users@httpd] mod_rewrite



  

  

 


  

 





Use a fully qualified URL for the rewrite. 

RewriteRule ^foo$         http://blah.com/foo/ [R] 

I have a farm and many many rewrites, and this works. 
  



  

  _____  




From: mmckenzie@unmc.edu [mailto:mmckenzie@unmc.edu] 
Sent: Thursday, January 27, 2005 11:42 AM
To: users@httpd.apache.org; apache-modules@covalent.net
Subject: [users@httpd] mod_rewrite 



We are currently using apache mod_rewrite to solve the trailing slash
problem which works fine but now we have a different problem. 

We use the following rule:  RewriteRule ^foo$         foo/ [R] 

We have three webservers running behind a load balancer.  On each
webserver there are two virtual hosts running on different ports. 

Vhost 1 = www.unmc.edu running on port 80 
Vhost 2 = www.citymatch.org on port 8009 

Since we are using mod_rewrite to add a trailing slash the following
problem occurs: 

1. The user requests the following url from their webbrowser:
http://www.citymatch.org/Conference2005 

2.  This url is passed to mod_rewrite because it is missing the trialing
slash. 

3.  mod_rewrite returns the url as
http://www.citymatch.org:8009/Conference/ 

4.  Since we are using the [R] and external redirect is used. 

5.  The request gets to the firewall and the fire wall won't allow port
8009 and nor will the loadbalancer. 

I realize I could just open these ports up but that would not make us
secure as we could be and that is always the goal. 

Is there a way to tell mod_rewrite not to add a port to the newly
constructed url or tell it to use just the fully qualified name? 

Is it apache that adds the port number to the url? 

Mitchell S. McKenzie
Programmer
 <http://app1.unmc.edu/leis> Learning Environment & Internet Services
University of Nebraska Medical Center
Phone: 402-559-9306
Cell Phone: 402-708-1493

University of Nebraska Medical Center E-mail Confidentiality Disclaimer :
The information in this e-mail is privileged and confidential, intended
only for the use of the addressee(s) above.
Any unauthorized use or disclosure of this information is prohibited. 
If you have received this e-mail by mistake please delete it and
immediately contact the sender. 


Mime
View raw message