背景
直接访问smartbi地址是http协议格式的,但是由于实际的安全需要通过nginx修改成了https格式的地址,此时可能会出现各种问题。
nginx配置如下:
#user nobody;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
client_max_body_size 80m;
client_body_buffer_size 10m;
sendfile on;
tcp_nopush on;
keepalive_timeout 120;
server_tokens off;
server {
listen 80 ;
listen 443 ssl;
server_name www.xxx.com;
access_log logs/www.xxx.com.log;
error_log logs/www.xxx.com.log;
ssl_certificate ssl/xxx.com.crt;
ssl_certificate_key ssl/xxx.com.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
root html;
index index.html index.htm index.php;
location / {
proxy_pass http://10.10.202.17:18080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_max_temp_file_size 0;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
}
}
现象
类似上述配置在通过https格式的地址访问时可能会出现如下的问题:
1、在界面上无法导出资源、系统日志、备份知识库;
2、打开报表点导出按钮无法导出文件;
3、配置了域名,使用了企业微信扩展包后推送报表到企业微信后通过企业微信app无法正常打开报表(出现404等错误);
解释
出现上述问题的原因在于https协议格式的地址在重定向后变成了http,也就是nginx没有通知浏览器重定向也要使用https的地址。
解决方案
如果是上述配置文件,需要在location /大括号中增加一行如下配置:
proxy_redirect http:// https://
这一行的含义是在重定向时遇到http://格式的地址全部替换成https://
Viewtracker License Missing
There is a problem with the license of the Viewtracker addon. Please check if you have a valid license.
授权码细节