I am trying to get this all to work nicely together and struggling greatly…
Basically, what I am trying to accomplish is this:
On the proxy server, port 83 is a simple index.html hosted page which contains an iframe. The iframe is attempting to open port 93 on the same server (the proxy server). Port 93 is a reverse proxy (Nginx) which is changing the user-agent and then executing a proxy_pass to the final web app (the one that I actually want to display). The final web app is located on a different server. I have been fussing with this for weeks. I have been able to make varying degrees of progress but I have to throw in the towel. I’m out of ideas. I have had this working before but I cannot recall what I did. Any thoughts?
Simplified ports and process: 10.10.10.100:83 (iframe) –> 10.10.10.100:93 (reverse proxy redirect with change in user-agent) –> 10.10.10.200:83
Port 83 (simple index.html supporting the execution of an iframe being ran on Nginx):
Conf from sites-enabled
server {
listen 83 default_ server;
listen [::]:83 default_server;
root /var/www/test:
index index.html
server_name localhost;
location / {
try_files Suri Suri/ =404;
}
}
Content of index.html
<style>
#scaled-frame{
position=absolute;
top: 0; left: 0;
bottom: 0;
right: 0;
width:100%;
height: 100%;
border=none;
margin=0;
padding=0;
overflow:hidden;
z-index: 999999;
zoom: 1;
-moz-transform: scale (4);
-moz-transform-origin: 0 0i
-o-transform: scale (4);
-o-transform-origin: 0 0;
-webkit-transform: scale (4)i
-webkit-transform-origin: 0 0i
}
</style>
<div><iframe id="scaled-frame" src="https://10.10.10.100:93">/iframe>
</div>
Port 93 (Nginx reverse proxy) – just a .conf file in sites-enabled
`
server
{
listen 93 default_server;
location / {
proxy_set_header User-Agent"Mozi11a/4.0(compatible; MSIE 6.0;Windows NT 5.1; Windows Phone 6.5.3.5)";
proxy_set_header Viewport "width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no";
proxy_connect_timeout 159s;
proxy_send_timeout 600;
proxy_read_timeout 600;
proxy_buffer_size 64k;
proxy_buffers 16 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k冫
proxy_pass_header Set-Cookie;
proxy_redirect off;
proxy_hide_header Vary;
proxy_set_header Accept-Encoding '';
proxy_ignore_headers Cache-Control Expires;
proxy_headers_hash_max_size 512;
proxy_set_header Host $host;
proxy_set_header Cookie $http_cookie;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded
proxy_pass http://10.10.10.200:83/app/;
}
}
`