Practical mod_perl / HTML Book /



previous page: 4.9. Tips and Tricks
  
page up: HTML Version of the book
  
next page: 4.9.2. Running the Same Script from Different Virtual Hosts

4.9.1. Publishing Port Numbers Other Than 80


If you are using a dual-server setup, with a mod_perl server listening on a high port (e.g., 8080), don't publish the high port number in URLs. Rather, use a proxying rewrite rule in the non-mod_perl server:

RewriteEngine      On
RewriteLogLevel    0
RewriteRule       ^/perl/(.*) http://localhost:8080/perl/$1 [P]
ProxyPassReverse   /          http://localhost/

In the above example, all the URLs starting with /perl are rewritten to the backend server, listening on port 8080. The backend server is not directly accessible; it can be reached only through the frontend server.

One of the problems with publishing high port numbers is that Microsoft Internet Explorer (IE) 4.x has a bug when re-posting data to a URL with a nonstandard port (i.e., anything but 80). It drops the port designator and uses port 80 anyway. Hence, your service will be unusable for IE 4.x users.

Another problem is that firewalls will probably have most of the high ports closed, and users behind them will be unable to reach your service if it is running on a blocked port.

 

Continue to:

  • prev: 4.9. Tips and Tricks
  • Table of Contents
  • next: 4.9.2. Running the Same Script from Different Virtual Hosts







TOP
previous page: 4.9. Tips and Tricks
  
page up: HTML Version of the book
  
next page: 4.9.2. Running the Same Script from Different Virtual Hosts


Menu

  • HTML Book
  • PDF Book
  • Download Code
  • Table of Contents
  • Errata
  • mod_perl2 User's Guide
  • Sitemap

Search


Add to Google




Creative Commons License


Written by
Eric Cholet (Logilune) and
Stas Bekman (StasoSphere & Free Books).


[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007 StasoSphere.com