首页 / 浏览问题 / 云GIS / 问题详情
nginx做反向代理,配置ssl,倾斜摄影数据访问不到
24EXP 2022年01月20日

1、 操作系统:win10 x64, iserver10.1.4

2、问题详细描述:nginx做反向代理和ssl配置,倾斜模型数据请求不到,报404

3、nginx配置

server {
        listen 443 ssl;
        server_name localhost;
        #第一个文件的全路径
        ssl_certificate ssl.pem;
        #第二个文件的全路径
        ssl_certificate_key ssl.key;
        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout 5m;
        ssl_ciphers  HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers  on;
        location / {
            index index.html index.htm;
        }
        location /iserver/ {
            add_header  'Access-Centrol-Allow-Origin'  *;
            add_header  'Access-Control-Allow-Credentials' 'true';
            add_header  'Access-Control-Allow-Methods' 'GET,POST,OPTIONS';
            proxy_set_header    Host           $http_host;
            proxy_set_header    X-Real-IP       $remote_addr;
            proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header     X-Forwarded-Proto https;
            proxy_hide_header X-Application-Context;
            proxy_pass http://127.0.0.1:8090/iserver/;
        }

4、请求倾斜摄影

https://localhost/iserver/services/3D-CeShiYong/rest/realspace/datas/N1_84/data/path/Tile_%2B014_%2B102/Tile_%2B014_%2B102.s3mb

报错:{"succeed":false,"error":{"code":404,"errorMsg":"瓦片数据不存在"}}

5、请求3dmax、白模等数据正常

https://localhost/iserver/services/3D-CeShiYong/rest/realspace/datas/%E7%94%B5%E5%A1%94_%E5%8D%97@%E7%94%B5%E5%A1%94_84/data/path/Tile_-0356_1382_0000/Tile_-0356_1382_0000.s3mb
 

1个回答

您nginx配置中的location /iserver/{}中的配置请您参考下面这块内容修改下:

location /iserver/ {
        add_header Access-Control-Allow-Origin * ;
        add_header Access-Control-Allow-Credentials true;
        add_header Access-Control-Allow-Methods 'GET,POST,OPTIONS';
        add_header Access-Control-Allow-Headers 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With';
        #add_header Content-Type "application/octet-stream";
        proxy_pass http://ip:8090/;
        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;

        }
2,243EXP 2022年01月21日
...