Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
david_kesselhei
Contributor III
Contributor III

Virtual Proxy Auth with nginx

Hi,

 

I need to give out an URL to one of our apps so that it can be viewed from a browser on a TV without logging in.

 

I set up a virtual proxy in Qlik and installed nginx as a reverse proxy append the header:

 

 

 

server {
        listen 80 default_server;
        listen 443 ssl;
        root /config/www;
        index index.html index.htm index.php;
        server_name _;
        ssl_certificate /config/keys/cert.crt;
        ssl_certificate_key /config/keys/cert.key;
        client_max_body_size 0;
        location / {
                try_files $uri $uri/ /index.html /index.php?$args =404;
        }
        location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_index index.php;
                include /etc/nginx/fastcgi_params;

        }
location /bio {
    access_log /config/log/nginx/upstream.log upstreamlog;
    resolver 127.0.0.11 valid=30s;
    proxy_set_header hdr-sense myuser;
    proxy_pass http://myqlikserver/biomaze/hub;

}
}

 

 

 

When connecting to the reverse proxy I get HTTP 401 not authorized. It works when I use a browser extension (as mentioned here) that sends the header on every request.

 

Here is a screenshot of the setup in QMC:

 


[28/Oct/2020:15:24:03 +0100] 172.30.82.132 - - - _ to: 172.20.7.4:443: GET /bio HTTP/1.1 upstream_response_time 0.011 msec 1603895043.855 request_time 0.011
[28/Oct/2020:15:26:04 +0100] 172.30.82.11 - - - _ to: 172.20.7.4:443: GET /bio HTTP/1.1 upstream_response_time 0.015 msec 1603895164.895 request_time 0.048
[28/Oct/2020:15:26:26 +0100] 172.30.82.11 - - - _ to: 172.20.7.4:443: GET /bio HTTP/1.1 upstream_response_time 0.010 msec 1603895186.612 request_time 0.010
[28/Oct/2020:15:27:02 +0100] 172.30.82.11 - - - _ to: 172.20.7.4:80: GET /bio HTTP/1.1 upstream_response_time 0.012 msec 1603895222.228 request_time 0.012
[28/Oct/2020:15:27:19 +0100] 172.30.82.132 - - - _ to: 172.20.7.4:80: GET /bio HTTP/1.1 upstream_response_time 0.011 msec 1603895239.602 request_time 0.012
[28/Oct/2020:16:09:50 +0100] 172.31.241.106 - - - _ to: 172.20.7.4:80: GET /bio HTTP/1.1 upstream_response_time 0.013 msec 1603897790.015 request_time 0.012

 

I don't know how to get the corresponding Qlik log, please let me know if you do.

 

Does anybody know how to set this up so that no login/extensions are required from the user side?

Thanks for any help,

David

Labels (3)
1 Reply
david_kesselhei
Contributor III
Contributor III
Author

Here is the QMC screenshot, the forum seems to delete it in the first post when I post it:

qmc.png