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

NGINX反向代理内容未正确显示,nginx,proxy,reverse,Nginx,Proxy,Reverse,我正在尝试使用NGINX反向代理各种内部应用程序/站点/服务,并且已经能够在其他应用程序/站点/服务不工作的情况下让一些应用程序/站点/服务工作 例如,我在下面添加了一些代码。鳄梨酱的第一个反向代理没有任何问题 Muximux的第二个反向代理显示没有正确格式的内容。不知道为什么 第三个设置给出404/not found错误 ################################################# ################### 10.10.1.2 #######

我正在尝试使用NGINX反向代理各种内部应用程序/站点/服务,并且已经能够在其他应用程序/站点/服务不工作的情况下让一些应用程序/站点/服务工作

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

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

第三个设置给出404/not found错误

#################################################
################### 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;
    }

}
对于可能出现的错误,我们将不胜感激


感谢

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

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

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

有些应用程序设计为不在子文件夹中运行,而另一些应用程序则几乎不需要调整。您需要调查每个应用程序的配置,并查找配置项以设置基本URL