You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lava Saleem <ln...@ualr.edu> on 2011/01/13 17:32:39 UTC
reverse proxy rule configuration
Hi everyone,
I have a web page html embedded with java script deployed in the apache,
this webpage is suppose to retrieve data from different server, for some
reason this is not happening cause Iam violating java script same origin
policy and I have been told that what I need to do is set up a reverse proxy
rule to avoid that, I have read the following website and to be honest I'm a
bit confused about configuring a rule ? I'm not quite sure if this is the
right thing to do to avoid violating same origin policy, I know both boxes
(apache and the other server) are in the same domain, if you have further
information please send me your feedback
http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html
Thank you
Lava
Re: reverse proxy rule configuration
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Lava,
On 1/13/2011 1:35 PM, Lava Saleem wrote:
> Thanks for the feedback, what I have is a apache tomcat that is set
> to default I haven't changed any configuration.
Okay. Default Tomcat configuration does not involve Apache httpd. Tomcat
does not do proxying of any kind AFAIK. What I'm saying is that you need
to configure Apache httpd (or some other web server) to do what you want
it to do.
> somebody told me to set up a reverse proxy rule in the tomcat apache
> to avoid the same origin policy violation
You want to do forward-proxying, not reverse-proxying (though you might
have to do both) in order to fix your problem. Tomcat cannot do this
with simple configuration: you will need to use a web server like Apache
httpd or write a whole bunch of your own code to do proxying through Tomcat.
> I'm not sure if that will solve the same origin policy issue, do you
> think that will solve it?
Yes, it probably will solve your problems. The real question is why you
have the problem to begin with.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0vU9QACgkQ9CaO5/Lv0PAAKwCfdSxWEvOAsT6TOKjp631XDc6Y
lK8An0bDsaBNzfVADWUCRctwqwuZRzgn
=JHMF
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: reverse proxy rule configuration
Posted by Lava Saleem <ln...@ualr.edu>.
Chris,
Thanks for the feedback, what I have is a apache tomcat that is set to
default I haven't changed any configuration,I have uploaded html webpage
that has embedded java script, the web page suppose to send json data to
another server and return json data back, the problem is the other server is
not responding, somebody told me to set up a reverse proxy rule in the
tomcat apache to avoid the same origin policy violation, to be honest I
don't know how to set up reverse proxy rule and I'm not sure if that will
solve the same origin policy issue, do you think that will solve it?
On Thu, Jan 13, 2011 at 11:43 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Lava,
>
> On 1/13/2011 11:32 AM, Lava Saleem wrote:
> > I have read the following website and to be honest I'm a bit confused
> > about configuring a rule?
>
> One opint of confusion may be that the configuration for a reverse proxy
> must be at the /web server/ level, and not in Tomcat. The configuration
> examples shown in the document you're reading are for Apache httpd (the
> web server) not for Apache Tomcat (the application server).
>
> Are you running Apache httpd? If not, you're reading the wrong HOWTO.
>
> > I'm not quite sure if this is the
> > right thing to do to avoid violating same origin policy
>
> One could argue that subverting the same-origin policy isn't a good
> thing to do :)
>
> > I know both boxes (apache and the other server) are in the same
> > domain, if you have further information please send me your feedback
> > http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html
>
> Some examples of your environment would make it easier to understand
> what you're trying to do, and help us help you.
>
> Thanks,
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk0vK6oACgkQ9CaO5/Lv0PCZfACdGDqS4IpEMimj2hNn6Q5Y8N3x
> HhoAoKZ3OKr63B2XssBehkPSF94Le/zm
> =6WUi
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: reverse proxy rule configuration
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Lava,
On 1/13/2011 11:32 AM, Lava Saleem wrote:
> I have read the following website and to be honest I'm a bit confused
> about configuring a rule?
One opint of confusion may be that the configuration for a reverse proxy
must be at the /web server/ level, and not in Tomcat. The configuration
examples shown in the document you're reading are for Apache httpd (the
web server) not for Apache Tomcat (the application server).
Are you running Apache httpd? If not, you're reading the wrong HOWTO.
> I'm not quite sure if this is the
> right thing to do to avoid violating same origin policy
One could argue that subverting the same-origin policy isn't a good
thing to do :)
> I know both boxes (apache and the other server) are in the same
> domain, if you have further information please send me your feedback
> http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html
Some examples of your environment would make it easier to understand
what you're trying to do, and help us help you.
Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0vK6oACgkQ9CaO5/Lv0PCZfACdGDqS4IpEMimj2hNn6Q5Y8N3x
HhoAoKZ3OKr63B2XssBehkPSF94Le/zm
=6WUi
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org