mod-proxy

Apache + Tomcat: Using mod_proxy instead of AJP

Is there any way I connect Apache to Tomcat using an HTTP proxy such that Tomcat gets the correct incoming host name rather than localhost? I'm using this directive in apache: ProxyPass /path http://localhost:8080/path But it comes through as localhost, which is useless when we have a bunch of sites on the same server. I could set the...

Apache VirtualHost with mod-proxy and SSL

I am trying to setup a server with multiple web applications which will all be served through apache VirtualHost (apache running on the same server). My main constrain is that each web application must use SSL encryption. After googling for a while and looking other questions on stackoverflow, I wrote the following configuration for the ...

Tomcat Clustering and HTTPS Issue

Hi I have two instances of Tomcat 6 with content accessible via HTTP and HTTPS for other pages. I have configured the instances this way: 1) Instance one to listen on port 8080(Http) and 8443(Https) 2) Instance two to listen on port 7080(Http) and 7443(Https) I have mod_proxy configured with Apache 2.2 to do clustering. The re...

apache to tomcat: mod_jk vs mod_proxy

What are the advantages and disadvantages of using *mod_jk* and *mod_proxy* for fronting a tomcat instance with apache? I've been using mod_jk in production for years but I've heard that it's "the old way" of fronting tomcat. Should I consider changing? Would there be the benefits? thanks ...

Understanding mod_proxy and Apache 2 for writing a comet-server

Hi folks, I currently try to implement a simple HTTP-server for some kind of comet-technique (long polling XHR-requests). As JavaScript is very strict about crossdomain requests I have a few questions: As I understood any apache worker is blocked while serving a request, so writing the "script" as a usual website would block the apach...

Apache & JBoss use port 80 at the same time

I have both Apache 2 and JBoss 4.2.3 on the same machine and would like both of them to use port 80. There are several ways I see people doing this mod_jk, mod_proxy, but I'm not sure which one is the best. I don't need any load balancing, but I do need HTTPS. ...

How to use a different path name in ProxyPass than the Tomcat context name

Hello, I am using Tomcat 5.5.9 and Apache 2.x We are trying to use a path name in ProxyPass that is different than the Tomcat context name. ProxyPass /path http://localhost:8080/contextname However, this does not work. When these two are the same then everything works fine. Most examples I see on the net also have the path equal to...

combining proxy server modules with my webapplication

I want to implement a autmatic billing systen for one cybercafe.MEasning when some one want to surf net in my cafe he goes to attendent and attendent allocates him the pc and gives him the passswd which is generated by the applciation and the passswd will be valid for specific time(session of 1 hr or so depending on customer needs).Now ...

How to configure Apache to proxy exactly one file?

(I must be dense - I just can't figure out the Apache documentation on how to do this.) To speed up some swf development I'm doing, I want to have my local machine fetch my local swf when I browse to our studio's test website. Just the one local swf only - with the rest pulled from the test website. So I set up apache on port 80 with m...

How to detect network connection failures in mod_proxy?

We have an Apache server accepting connections through mod_proxy from random computers with bad internet connections in Africa. We would like to know how many of these connections are attempted (and fail, or are truncated) as possible. How do we set up such logging in mod_proxy? All the other threads I've found online imply that mod_pro...

Can Apache BalancerMember be configured to use unix domain sockets?

I am using the Apache Proxy balancer directive to hook up a set of thin servers (for Rails). Like so: <Proxy balancer://thinservers> BalancerMember http://127.0.0.1:5000 route=thin0 BalancerMember http://127.0.0.1:5001 route=thin1 BalancerMember http://127.0.0.1:5002 route=thin2 </Proxy> However, thin can also be conf...

Reverse Proxy in CakePHP?

I've got a CakePHP application, and the following directives in my httpd.conf ProxyRequests off ProxyPass /forum/ http://somesite.com/phpbb3 ProxyPass /gallery/ http://someothersite.com/gallery3 <Location /forum/> ProxyPassReverse / </Location> <Location /gallery/> ProxyPassReverse / </Location> Without CakePHP this wo...

Proxy URL without authentication

I have an Apache web server with basic authentication enabled at the root directory. I can't change this due to business restrictions. However, we want a particular URL to be a proxy to a different site, with different authentication, without being asked for authentication by the main site. Example: My site is http://foo.com/ If you g...

URL/Apache redirection question. (domain+directory redirect to sudomain)

Hello, I have been trying to figure this out for about 2 hours now. A new requirement came up where it was asked of me to try to find a way to send requests from foo.bar.com/blah to blah.bar.com. Technically /blah doesn't exist, but I was hoping to have the server redirect before it gets to that point. Has anyone had to do this before...

How do I reliably access the HttpServletRequest in a jspx when it's behind a proxy?

I've got a jspx that needs to know the current HttpServletRequest's getServerName(). The jspx can fetch this with #{mybean.serverName} from its bean, like this: public String getServerName() { HttpServletRequest request = (HttpServletRequest) FacesInstance.getCurrentInstance().getExternalContent().getRequest(); return request.getS...

Access particular server behind load-balanced tomcat

I'm building production configuration where 2 tomcats are sitting behind the apache with load-balancer and mod_proxy. What I need is the script which checks whether particular instance of tomcat is running. The problem is I use AJP connector in tomcat. Is it possible to issue HTTP request to apache somehow that I make sure only needed in...

Tomcat serving URLs wrong with mod_proxy and apache

I've set up a host with apache to serve static pages and to use Tomcat to serve my web application (See this question). The static pages are server from "http://myhost.com" and the dynamic (tomcat) pages are server from "http://myhost.com/myapp" The mod_proxy makes sure the "http://myhost.com/myapp" are forwarded to tomcat server run...

Apache Rewrite Override Mime and Proxy Request?

I am trying to implement some Apache rewrite rules to set the MIME type (in)correctly for XHTML in Internet Explorer. I have found these rewrite rules in many place, and they seem to work for most people: RewriteCond %{HTTP_USER_AGENT} .*MSIE.* RewriteRule .* - [T=text/html] However, my site is already using Rewrite rules with the...

BlazeDS Servlet not responding through Proxy

Hi everybody, I have a problem using Flex with BlazeDS on a Tomcat 5.5 through a Proxy (Apache). I already searched for it but didn't find answers which solved my problem. I hope you guys can help me out. :-) Our scenario is the following: Flex-App using BlazeDS to communicate with our Dataservice on a Tomcat 5.5. The Webapp is balze ...

Apache2 mod_proxy Proxy Error

My web-app is located in mysite.com:8080. I want to access to it by typing webapp.mysite.com. So, I followed these steps: 1)Enable needed modules: a2enmod proxy a2enmod proxy_http apache2 restart 2)Create /etc/apache2/sites-available/mysite <VirtualHost *:80> ServerName webapp.mysite.com ProxyRequests Off <Proxy *> ...