Forum Moderators: phranque
A webpage on my server uses httpS://
On this page there is a java applet that calls an outside ip address..
So the user gets a warning that part of the data is not secure...
I am trying to use Mod_Rewrite to make my server see this outside ip as local or something....
Anyone know of a better way to do this?
I cant seem to get this to work with Mod_Rewrite..
Thanks
All I can give you is a general pointer that you can use Apache mod_proxy [httpd.apache.org] to map the foreign server into your server's URL-space, and this *msy* solve the warning problem. See the ProxyPass directive.
Be sure to limit access to the proxied server very tightly -- You don't want to open a security hole in your secure server functions.
Jim
I was going to say.. that I think mod_proxy is the way... :)
I am reading about proxy_pass.. but this tuff can take tons of time!
To implament this... do you just make a .htaccess file in the root dir whith the info in it?
Like...
ProxyPass /outside ip/ [mydomain.com...]
Thanks again!
No, as stated in the documentation, ProxyPass is available in server configuration and virtual host contexts only, so the code needs to go into httpd.conf. If you don't have access to httpd.conf, contact your hosting provider. If they won't help, then you'll likely have to change hosting levels or hosting services if this is important to your site.
I've never used mod_proxy myself, so we are both working from "the book" here. Maybe someone else will stop in who can be of more help, but in the meantime, studying the available documentation and maybe doing a few searches of the Apache site and the Web will be helpful. If there is a forum for the secure script you're using, that might be a good place to check, too.
Jim
The use of both of these ways is that you can map the context of a remote server into your local directory structure, for example if you have www.yourdomain.com and you want the www.otherdomain.com be mapped to www.yourdomain.com/otherdomain path. In this case the apache for the www.yourdomain.com/otherdomain/index.html request will fetch the www.otherdomain.com/index.html page from the remote webserver and sends the reponse for the original request as if it were a local file.
So I think you are on the right track here.
ProxyPass [mydomain.com...] [555.555.555.555...]
Then in the applet code I changed the codebase from:
From:
CODEBASE=\"http://555.555.555/\"
To:
CODEBASE=\"https://www.mydomain.com/cotaproxy/\"
No dice.... does not work...
and the applet cannot find the class file it needs.
I did not think it would be that easy :)
With the ip in the applet it works fine..
But you get the security warning saying that part of it is coming from another server...
Anyone got any tips?
ProxyPass /cotaproxy/ http://555.555.555.555/
The syntax of the ProxyPass directive is:
ProxyPass <path> <remote_url>
I added this to my httpd.conf file.
ProxyPass /cotaproxy/ [555.555.555.555...]
(I changed the ip to be the ip of the outside server)
I am trying to understand how this is to work...
I need my server to think that 55.555.55.555 is local or whatver.... so it does not give that security warning.
So in the java applet I call the codebase like this..
[mydomain.com...]
And my server will pull the info from 55.555.55.555?
I still did not work.. but maybe it has something to do with the applet...
thanks so much for everyones time!
Here is the error I get when I type it like this:
[domain.com...]
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /cotaproxy/.
Reason: Could not connect to remote machine: Connection refused
--------------------------------------------------------------------------------
Apache/1.3.27 Server at www.domain.com Port 443
thanks
that server with the remote ip was down!
so it works... when I type
[domain.com...]
I actually get that remote server....
This is great! THANKS TO ALL!
Now to get this applet to work...
Thanks again
It even works with or without https...
If you are specifying http, and you don't get the prompt, then that would be odd.
If you don't specify any protocol, then it should utilize the same protocol that the main page loaded under (which is https).