NGINX 反向代理内容显示不正确

NGINX Reverse Proxy Content Not Displaying Properly

我正在尝试使用 NGINX 来反向代理各种内部 apps/sites/services 并且已经能够让一些工作而其他人不工作。

例如,我在下面添加了一些代码。鳄梨酱的第一个反向代理没有任何问题。

Muximux 的第二个反向代理显示没有正确格式的内容。不知道为什么?

第三个设置给出了 404/未找到错误。

#################################################
################### 10.10.1.2 ###################
#################################################

server {
    listen 80;
#   listen 80 default_server;
#   listen [::]:80 default_server;
    root /var/www/html;
    index index.html index.htm index.nginx-debian.html;
    server_name 10.10.1.2;


    location / {
        try_files $uri $uri/ =404;
    }

    location /guac {
    proxy_pass http://10.10.1.3:8080/guacamole;
    proxy_buffering off;
    access_log off;
    tcp_nodelay on;
    tcp_nopush off;
    sendfile on;
    client_body_buffer_size 10K;
    #client_header_buffer_size 1k;
    client_max_body_size 8m;
    #large_client_header_buffers 2 1k;
    client_body_timeout 12;
    #client_header_timeout 12;
    keepalive_timeout 15;
    send_timeout 10;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    }


    location /muximux {
    proxy_pass http://10.10.1.10/mux/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    }

    location /localserve {
    proxy_pass http://10.10.1.10;
    }

}

如能就可能出现的问题提供任何帮助和指导,我们将不胜感激。

谢谢

通过将它们放置在单独的子文件夹中,可以实现对单个服务器块中多个应用程序的反向代理。

但是,每个应用程序都必须知道它托管在一个子文件夹中。

应用程序返回的页面包含指向资源文件和页面链接的 URLs。通常,这些URL(由应用程序创建)也必须以子文件夹为前缀,否则它们将无法正确通过反向代理,导致显示的页面格式不正确。

有些应用程序未设计为 运行 在子文件夹中,而其他应用程序几乎不需要调整。您将需要调查每个应用程序的配置并寻找一个配置项来设置基础 URL.