yes, they are both located on port 2000. I am indeed using the reverse proxy option.
On Tue, Aug 25, 2015 at 5:13 PM, Robert Webb <rw...@ropeguru.com> wrote: > Some clarification needed here. > > Is the app and the jetty backend on the same server? If so, are you using > the reverse proxy option because jetty typically would listen on port 80 > and is on a different server from the app but you have a need for app and > jetty on the same server so the jetty needed an alternate port? > > Robert > > > > On Tue, 25 Aug 2015 13:52:07 -0400 > > Steven Shi <steven200...@gmail.com> wrote: > >> My webserver is not listening on port 2000, the Jetty back end server of >> the app is. The app is a maven build of apache spark which runs the Jetty >> server; I have it set to listen on port 2000. >> >> The app in "any requests the app makes" would be the frontend of the >> server >> that uses jquery for requests. >> >> The remote IP as shown from the developers console in Google chrome. I >> looked at the failed GET request. >> >> I know the problem is not caused by the SSL rewrite (tested by turning of >> SSL module). >> >> On Tue, Aug 25, 2015 at 1:28 AM, Kurtis Rader <kra...@skepticism.us> >> wrote: >> >> On Mon, Aug 24, 2015 at 9:52 PM, Steven Shi <steven200...@gmail.com> >>> wrote: >>> >>> I have looked at and tried using the ProxyPassReverse directive. >>>> >>>> So the app communicates with the back end over port 2000. Any requests >>>> the app makes are sent to localhost:2000/foo to be processed by the back >>>> end. >>>> >>>> Currently the relevant configuration is >>>> >>>> ProxyPass /app http://localhost:2000 >>>> ProxyPassReverse /app http://localhost:2000 >>>> >>>> Basically, when the frontend of the app at localhost:2000 sends a GET >>>> request, it's being sent as localhost:80/request rather than >>>> localhost:2000/request. Likewise, the remote IP address is shown as >>>> localhost:80 rather than localhost:2000. >>>> >>>> If I go straight to localhost:2000, the app works as intended and makes >>>> all requests to localhost:2000/request while showing the remote IP to be >>>> localhost:2000. >>>> >>>> >>> I can appreciate that you are frustrated by seemingly non-sensical >>> behavior from the programs you're working with. I recently experienced a >>> similar situation when trying to setup a virtual host that would proxy >>> requests to another http server while the Apache httpd daemon also >>> honored >>> my mod_rewrite rules for blacklisted sources which should not be proxied. >>> It took me several hours to figure out how to configure Apache httpd to >>> do >>> what I wanted. Nonetheless, your description of the situation is >>> incoherent. >>> >>> Let us start with your last paragraph where you say "If I go straight to >>> localhost:2000". I assume you are saying that if you enter " >>> http://localhost:2000/" in your web browser you get the expected >>> behavior. Is your Apache web server listening on port 2000? The reason I >>> ask that question is due to your statement that "any requests the app >>> makes >>> are sent to localhost:2000". Which implies the app in question is >>> directly >>> connecting to the backend without being proxied by the Apache httpd >>> process. What is this "app" and is it connecting to port 2000 or port 80 >>> on >>> the local host? >>> >>> What is the "app" in the statement "any requests the app makes"? Is it a >>> web browser or something else? And if something else please provide more >>> details. What do you mean by "the remote IP address is shown as >>> localhost:80"? Shown where? By what program? >>> >>> -- >>> Kurtis Rader >>> Caretaker of the exceptional canines Junior and Hank >>> >>> > >