Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Access IntraWeb application from nginx reverse proxy
#1
Usually, configure nginx reverse proxy is easy and straight forward, but I couldn't get it work with IntraWeb application.

For example, I wish to access IntraWeb applicaton from URL http://www.example.com/intraweb

The Intraweb application is accessible from http://10.1.1.1:8888/

Here is my nginx configuration:

    location /intraweb {
        proxy_pass       http://10.1.1.1:8888$request_uri;
        proxy_set_header Host 10.1.1.1:8888;
    }

But it doesn't work.  Is there any setting I need to configure in IntraWeb?
Reply
#2
Hy, in your ServerController -> OnConfig:

Code:
  Self.RewriteURL := '/intraweb';
I use this on IIS and RewriteURL and it's pretty the same approach, maybe help you too.
Reply
#3
(07-23-2018, 07:36 AM)ccy Wrote: Usually, configure nginx reverse proxy is easy and straight forward, but I couldn't get it work with IntraWeb application.

For example, I wish to access IntraWeb applicaton from URL http://www.example.com/intraweb

The Intraweb application is accessible from http://10.1.1.1:8888/

Here is my nginx configuration:

    location /intraweb {
        proxy_pass       http://10.1.1.1:8888$request_uri;
        proxy_set_header Host 10.1.1.1:8888;
    }

But it doesn't work.  Is there any setting I need to configure in IntraWeb?

Hello,

are JNP mentioned, you need to set RewriteUrl property. Please have a look at item 4 of this document:

http://docs.atozed.com/docs.dll/deployme...Proxy.html

You can also find some example code to retrieve this from an .INI file. Most reverse proxy servers work the same way. 

A side note: If you are using reverse proxy in HTTPS and your IW application is plain HTTP you can (or should) also set 

"X-Forwarded-Ssl: on" header field

in your nginx server, so IW will work as HTTPS
Reply
#4
(07-31-2018, 04:59 PM)Alexandre Machado Wrote:
(07-23-2018, 07:36 AM)ccy Wrote: Usually, configure nginx reverse proxy is easy and straight forward, but I couldn't get it work with IntraWeb application.

For example, I wish to access IntraWeb applicaton from URL http://www.example.com/intraweb

The Intraweb application is accessible from http://10.1.1.1:8888/

Here is my nginx configuration:

    location /intraweb {
        proxy_pass       http://10.1.1.1:8888$request_uri;
        proxy_set_header Host 10.1.1.1:8888;
    }

But it doesn't work.  Is there any setting I need to configure in IntraWeb?

Hello,

are JNP mentioned, you need to set RewriteUrl property. Please have a look at item 4 of this document:

http://docs.atozed.com/docs.dll/deployme...Proxy.html

You can also find some example code to retrieve this from an .INI file. Most reverse proxy servers work the same way. 




A side note: If you are using reverse proxy in HTTPS and your IW application is plain HTTP you can (or should) also set 

"X-Forwarded-Ssl: on" header field

in your nginx server, so IW will work as HTTPS


is that working now?
What about $request_uri, if i use this i got an 502 error?
i mad a simple test, but startpage of iw starts loading but leave blank.
simple nginx.conf
server {
        listen       8080;
        server_name  localhost;

       
        location / {
                  proxy_pass http://localhost:80/;
        }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)