Re: httpd 2.2.4 + mod_proxy + tomcat 6.0.9 + ColdFusion

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

 



Dave Shuck wrote:
Pid, I appreciate your response. I would like to understand this a little better as it is currently just slightly more clear than voodoo magic to me. Is the specification of the port what points it to a specific instance on Tomcat? If so, I am assuming that I have to create some type of matching piece on the Tomcat side. Is this correct?
Thanks again!

On Sunday 11 February 2007 12:18:48 Pid wrote:
ReWriteEngine on

RewriteRule  ^\/(.+)\.cfm(.+)? ajp://localhost:8009/$1.cfm$2 [P,L]
RewriteRule  ^\/(.+)\.cfc(.+)? ajp://localhost:8009/$1.cfc$2 [P,L]





Hi

(Yes, sorry - dashed a quick reply off as I was heading out.)


mod_rewrite lets you send to a configured proxy.

The rule is designed to capture URLs by file type; the bit before .cfm gets the main bit of the path, the bit afterwards captures query string and session id data.

ajp:// indicates the protocol (you could also use http:// with the mod_proxy_http, but ajp is binary and superior in most cases)

(If you have a cluster - more than one tomcat - let me know)

localhost:8009 - server and port follow, which is a configured tomcat instance, to which you pass the path back references.

[P,L] are the mod_rewrite 'proxy' and 'last' rule instructions, respectively.

You can find detailed information about mod_rewrite in the Apache docs. It is worth trying to get your head around the mod_proxy doc. The mod_proxy_ajp documentation is somewhat obscure, as it isn't particularly clear that you don't need to do anything to configure it.

The main mod_proxy module accepts all the configuration instructions, the sub modules only provide protocol connectivity.

(ie you need mod_proxy_HTTP to: RRule /path HTTP://server:port/path )


The other way to forward requests is, as you mentioned, ProxyPass.
This is useful if you wish to send most requests to a server, but you *can* specify which paths not to.

E.g.

ProxyPass /css 		!  # a wayne's world style suffix 'not'
ProxyPass /javascript 	!  # one per path definition

ProxyPass /		ajp://server/port/ option=value option=value



On to Tomcat: only the ajp connector needs to be active; you can disable the http one if you're not going to use it. you only need to look at the ajp connector port number, it should work out of the box.

if you need help with tomcat configuration, join the tomcat-users list and ask (me?) for help there.


p



---------------------------------------------------------------------
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