谁动了我的数据库! 2022-09-15 16:36 采纳率: 55.6%
浏览 56
已结题

nginx资源加载问题

nginx 资源加载问题

server {
    listen 80;
    listen [::]:80;

    server_name servername1 servername2;

    root /home/didi/www/didi-loans-debt-admin/src;
    index index.html;

    # gzip config
    gzip on;
    gzip_min_length 1k;
    gzip_comp_level 9;
    gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.";

    location / {
        try_files $uri $uri/ /index.html;
    }

    location /web {
      proxy_pass http://192.168.14.14:8084;
      proxy_set_header   X-Forwarded-Proto $scheme;
      proxy_set_header   Host              $http_host;
      proxy_set_header   X-Real-IP         $remote_addr;
    }

    location ~ /\.  { deny all; }
    location ~* (\.conf$)  { deny all; }
    location ~* (package\.json$)  { deny all; }
}

使用servername1域名访问 在无痕浏览下 试过好几个浏览器都是这样

img

使用servername2域名访问
就是正常的

img

  • 写回答

3条回答 默认 最新

  • Lin_Miao_09 2022-09-15 18:16
    关注

    这个问题,附件是放在哪个服务器下的。是本地还是远程服务的。
    hosts 文件是否有映射

    评论 编辑记录

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 9月16日
  • 修改了问题 9月15日
  • 创建了问题 9月15日