vim /opt/lib/nginx/nginx-1.25.1/conf/vhost/hwl.sandieji.tech-15933-25933.conf

server {
            listen 15933;
     server_name 116.205.247.151;
       #    server_name hwl.sandieji.tech www.hwl.sandieji.tech;
      #      rewrite ^(.*)$   https://$host$1 permanent;
#}
#server {
#     listen 443 ssl;
     #填写绑定证书的域名
#     server_name hwl.sandieji.tech www.hwl.sandieji.tech;
     #网站主页路径。此路径仅供参考,具体请您按照实际目录操作。
     root /opt/apps/webs/hwl.sandieji.tech;
     #证书文件名称
#     ssl_certificate ssl/hwl.sandieji.tech_bundle.crt; 
     #私钥文件名称
#     ssl_certificate_key ssl/hwl.sandieji.tech.key; 
#     ssl_session_timeout 5m;
#     ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
#     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
#     ssl_prefer_server_ciphers on;
     #文件上传403错误大小限制
     client_max_body_size    4m;

    # 阻止特定文件访问
    location ~* /.bat {
          deny all;
    }
     location / {
             # 解决微信缓存页面配置
             autoindex on;
              add_header Cache-Control "no-store";
              expires -1;
                # 解决微信缓存页面配置 end
               add_header Access-Control-Allow-Origin *;
                add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept";
             add_header Access-Control-Allow-Methods "GET, POST, OPTIONS,PUT,DELETE";
               try_files $uri $uri/ @router;
               index  index.html index.htm;
         }
# location / {
#                proxy_pass http://localhost:4080/;
#                proxy_set_header Host $host;
#                proxy_set_header XfromAppId $http_XfromAppId;
#                proxy_set_header XownerId $http_XownerId;
#                proxy_set_header XsysId $http_XsysId;
#                proxy_set_header XuserId $http_XuserId;
#                proxy_set_header XverifyApi $http_XverifyApi;
#                proxy_set_header Authorization $http_Authorization;
#                proxy_set_header XfilterAreaCode $http_XfilterAreaCode;
#                proxy_set_header XuserFromFirstShareId $http_XuserFromFirstShareId;
#                proxy_set_header XuserFromSecondShareId $http_XuserFromSecondShareId;
#                proxy_set_header X-Real-IP $remote_addr;
#                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#  }

        location /ws/api/v3/ {
                proxy_pass http://localhost:25933/ws/api/v3/;
                proxy_set_header Host $host;
                proxy_set_header XfromAppId $http_XfromAppId;
                proxy_set_header XownerId $http_XownerId;
                proxy_set_header XsysId $http_XsysId;
                proxy_set_header XuserId $http_XuserId;
                proxy_set_header XverifyApi $http_XverifyApi;
                proxy_set_header Authorization $http_Authorization;
                proxy_set_header XfilterAreaCode $http_XfilterAreaCode;
                proxy_set_header XuserFromFirstShareId $http_XuserFromFirstShareId;
                proxy_set_header XuserFromSecondShareId $http_XuserFromSecondShareId;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                # 转发websocket需要的设置
                 proxy_connect_timeout 4s;                #配置点1
                proxy_read_timeout 60s;                  #配置点2,如果没效,可以考虑这个时间配置长一点
                proxy_send_timeout 12s;                  #配置点3
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "Upgrade";
        }

         location /plugins/ {
                proxy_pass http://localhost:8800/plugins/;
                proxy_set_header Host $host;
                proxy_set_header XfromAppId $http_XfromAppId;
                proxy_set_header XownerId $http_XownerId;
                proxy_set_header XsysId $http_XsysId;
                proxy_set_header XuserId $http_XuserId;
                proxy_set_header XverifyApi $http_XverifyApi;
                proxy_set_header Authorization $http_Authorization;
                proxy_set_header XfilterAreaCode $http_XfilterAreaCode;
                proxy_set_header XuserFromFirstShareId $http_XuserFromFirstShareId;
                proxy_set_header XuserFromSecondShareId $http_XuserFromSecondShareId;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         }
         location /bo/api/v3/file/upload/ {
                proxy_pass http://localhost:25933/bo/api/v3/file/upload/;
                proxy_set_header Host $host;
                proxy_set_header XfromAppId $http_XfromAppId;
                proxy_set_header XownerId $http_XownerId;
                proxy_set_header XsysId $http_XsysId;
                proxy_set_header XuserId $http_XuserId;
                proxy_set_header XverifyApi $http_XverifyApi;
                proxy_set_header Authorization $http_Authorization;
                proxy_set_header XfilterAreaCode $http_XfilterAreaCode;
                proxy_set_header XuserFromFirstShareId $http_XuserFromFirstShareId;
                proxy_set_header XuserFromSecondShareId $http_XuserFromSecondShareId;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                #proxy_method POST;
                #proxy_set_header Content-Type multipart/form-data;
         }
         location /events/cap/ {
                proxy_pass http://localhost:25933/cap/;
                proxy_set_header Host $host;
                proxy_set_header XfromAppId $http_XfromAppId;
                proxy_set_header XsysId $http_XsysId;
                proxy_set_header XuserId $http_XuserId;
                proxy_set_header XverifyApi $http_XverifyApi;
                proxy_set_header Authorization $http_Authorization;
                proxy_set_header XfilterAreaCode $http_XfilterAreaCode;
                proxy_set_header XuserFromFirstShareId $http_XuserFromFirstShareId;
                proxy_set_header XuserFromSecondShareId $http_XuserFromSecondShareId;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                # 转发websocket需要的设置
                 proxy_connect_timeout 4s;                #配置点1
                 proxy_read_timeout 60s;                  #配置点2,如果没效,可以考虑这个时间配置长一点
                 proxy_send_timeout 12s;                  #配置点3
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "Upgrade";
        }
         #
         location /events/metrics/ {
                proxy_pass http://localhost:25933/metrics/;
                proxy_set_header Host $host;
                proxy_set_header XfromAppId $http_XfromAppId;
                proxy_set_header XsysId $http_XsysId;
                proxy_set_header XuserId $http_XuserId;
                proxy_set_header XverifyApi $http_XverifyApi;
                proxy_set_header Authorization $http_Authorization;
                proxy_set_header XfilterAreaCode $http_XfilterAreaCode;
                proxy_set_header XuserFromFirstShareId $http_XuserFromFirstShareId;
                proxy_set_header XuserFromSecondShareId $http_XuserFromSecondShareId;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                # 转发websocket需要的设置
                 proxy_connect_timeout 4s;                #配置点1
                 proxy_read_timeout 60s;                  #配置点2,如果没效,可以考虑这个时间配置长一点
                 proxy_send_timeout 12s;                  #配置点3
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "Upgrade";
        }
         # 文件服务器 http://localhost:5520/filelibary/

      location /oss/ {
                proxy_pass http://localhost:5515/;
                proxy_set_header Host $host;
                proxy_set_header XfromAppId $http_XfromAppId;
                proxy_set_header XsysId $http_XsysId;
                proxy_set_header XuserId $http_XuserId;
                proxy_set_header XverifyApi $http_XverifyApi;
                proxy_set_header Authorization $http_Authorization;
                proxy_set_header XfilterAreaCode $http_XfilterAreaCode;
                proxy_set_header XuserFromFirstShareId $http_XuserFromFirstShareId;
                proxy_set_header XuserFromSecondShareId $http_XuserFromSecondShareId;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                # 转发websocket需要的设置
                 proxy_connect_timeout 4s;                #配置点1
                 proxy_read_timeout 60s;                  #配置点2,如果没效,可以考虑这个时间配置长一点
                 proxy_send_timeout 12s;                  #配置点3
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "Upgrade";
        }
         location /filelibary/ {
                #proxy_pass http://localhost:5515/;
                proxy_pass http://localhost:5515/filelibary/;
                proxy_set_header Host $host;
                proxy_set_header XfromAppId $http_XfromAppId;
                proxy_set_header XsysId $http_XsysId;
                proxy_set_header XownerId $http_XownerId;
                proxy_set_header XproxyOwnerId $http_XproxyOwnerId;
                proxy_set_header XuserId $http_XuserId;
                proxy_set_header XverifyApi $http_XverifyApi;
                proxy_set_header Authorization $http_Authorization;
                proxy_set_header XfilterAreaCode $http_XfilterAreaCode;
                proxy_set_header XuserFromFirstShareId $http_XuserFromFirstShareId;
                proxy_set_header XuserFromSecondShareId $http_XuserFromSecondShareId;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

          location /bo/api/v3/auth/ {
                proxy_pass http://localhost:25933/bo/api/v3/auth/;
                proxy_set_header Host $host;
                proxy_set_header XfromAppId $http_XfromAppId;
                proxy_set_header XownerId $http_XownerId;
                proxy_set_header XsysId $http_XsysId;
                proxy_set_header XuserId $http_XuserId;
                proxy_set_header XverifyApi $http_XverifyApi;
                proxy_set_header Authorization $http_Authorization;
                proxy_set_header XfilterAreaCode $http_XfilterAreaCode;
                proxy_set_header XuserFromFirstShareId $http_XuserFromFirstShareId;
                proxy_set_header XuserFromSecondShareId $http_XuserFromSecondShareId;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            }

       location /bs/api/ {
                proxy_pass http://localhost:25933/bs/api/;
                proxy_set_header Host $host;
                proxy_set_header XfromAppId $http_XfromAppId;
                proxy_set_header XownerId $http_XownerId;
                proxy_set_header XsysId $http_XsysId;
                proxy_set_header XuserId $http_XuserId;
                proxy_set_header XverifyApi $http_XverifyApi;
                proxy_set_header Authorization $http_Authorization;
                proxy_set_header XfilterAreaCode $http_XfilterAreaCode;
                proxy_set_header XuserFromFirstShareId $http_XuserFromFirstShareId;
                proxy_set_header XuserFromSecondShareId $http_XuserFromSecondShareId;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
       location /bo/api/ {
                proxy_pass http://localhost:25933/bo/api/;
                proxy_set_header Host $host;
                proxy_set_header XfromAppId $http_XfromAppId;
                proxy_set_header XownerId $http_XownerId;
                proxy_set_header XsysId $http_XsysId;
                proxy_set_header XuserId $http_XuserId;
                proxy_set_header XverifyApi $http_XverifyApi;
                proxy_set_header Authorization $http_Authorization;
                proxy_set_header XfilterAreaCode $http_XfilterAreaCode;
                proxy_set_header XuserFromFirstShareId $http_XuserFromFirstShareId;
                proxy_set_header XuserFromSecondShareId $http_XuserFromSecondShareId;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
        location @router {
                rewrite ^.*$ /index.html last;
        }
 }
文档更新时间: 2023-08-26 11:14   作者:admin