mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
view: 509|reply: 2
打印 prevThread nextThread

平台API经过转发之后404

[copyURL]

0

主题

54

帖子

228

积分

midMem

Rank: 3Rank: 3

积分
228
owner
poston 2022-8-2 10:27 | 显示全部楼层
请参考这个配置
    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        location ~* ^/(jichang) {

            add_header Access-Control-Allow-Origin *;
            add_header Access-Control-Allow-Methods *;
            add_header Access-Control-Allow-Headers *;
            
            if ($request_method = 'OPTIONS') {
              return 204;
            }
            
            proxy_pass http://192.168.88.11:9780;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_connect_timeout 1500s;
            proxy_send_timeout 1500s;
            proxy_read_timeout 1500s;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            rewrite ^/jichang/(.*)$ /$1 break;
        }
        
reply agree 1 Against 0

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-5-17 14:29 , Processed in 0.058596 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList