Re: mod_proxy and mod_rewrite issue

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

 



inas inassen wrote:
Hi all,

I have a web application running on tomcat with a context myapp

I access this webapp via apache using a proxypass and proxy balancer ==> http://myserver.com/myapp

Now, I want to use the url http://myserver.com and apache will forward my request to tomcat by adding the URI /myapp to this URL.

mod_rewrite does that, but my question is that how can I avoid displaying the context path in the browser adress bar?

so I want to write http://myserver.com/abd and to be redirected to http://myserver.com/myapp/abd without displaying the URL http://myserver.com/myapp/abd in the adress bar.

I believe you are missing an element above : both Apache and Tomcat cannot be listening on the same port 80 on the same server. So you must be proxying "http://myserver.com/abd"; to "http://myserver.com:8080/myapp/abd";, no ?

Anyway, do you have other applications than "/myapp" on your Tomcat server ?
If not, then you could make /myapp be the ROOT application under Tomcat.
See here for info of how to do that :
http://wiki.apache.org/tomcat/HowTo
#38

If you do that, then you could access your (formerly) /myapp application directly on Tomcat by "http://myserver.com:8080";.
And by consequence, you could also from Apache proxy directly there.

Another thing : have you looked at the AJP connectors (mod_proy_ajp and mod_jk) ?

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