NGINX 역방향 프록시는 Opera GX를 제외한 모든 브라우저에서 작동합니다. 문제의 원인은 무엇입니까?

NGINX 역방향 프록시는 Opera GX를 제외한 모든 브라우저에서 작동합니다. 문제의 원인은 무엇입니까?

안녕하세요. 자체 호스팅 웹사이트를 탐색할 때 이상한 문제가 발생했습니다.

Edge/Chrome/Firefox/Chromium에서 VPS 도메인(homeproxy(nginx)으로 프록시한 다음 홈 웹 서버1로 프록시해야 함)을 탐색하면 예상대로 작동합니다. Opera GX에서 동일한 작업을 수행하면 URL이 https://internal_web.domain/으로 다시 작성됩니다. 내부적으로 사용하는 도메인이 네트워크 외부에 존재하지 않기 때문에 DNS 오류가 발생합니다. 내부 웹서버에서는 Kanboard를 호스팅합니다. hello world와 함께 index.html을 제공하는 경우에도 마찬가지입니다.

3개 서버 모두: Ubuntu 22.04 nginx 버전: nginx/1.18.0(Ubuntu)

내부 도메인의 경우 모든 시스템에 /etc/hosts 항목이 있으며 모두 올바르게 해결됩니다.

Opera GX에서는 트래커와 광고 차단만 켜고 VPN은 끕니다. 내 DNS는 8.8.8.8 및 보조 8.8.4.4로 설정되어 있습니다.

Opera GX 버전: LVL4(코어: 98.0.4759.82) 업데이트 스트림: Early Access 운영 체제: Windows 11 64비트 Chromium 버전: 112.0.5615.165

구성에서 모든 IP/도메인을 마스킹했습니다.

VPS -> 홈프록시(nginx) -> home.webserver1(nginx)

VPS 구성 /etc/nginx/sites-enabled/webapp:

server {
        listen 80;
        server_name vps.myserver.domain;
        return 301 https://$host$request_uri;

        access_log /var/log/nginx/vps.myserver.domain.access.log;
        error_log /var/log/nginx/vps.myserver.domain.error.log;
}

server {
        listen                  443 ssl http2;
        server_name             vps.myserver.domain;
        ssl_certificate         /etc/nginx/ssl/vps.myserver.domain.pem;
        ssl_certificate_key     /etc/nginx/ssl/vps.myserver.domain.key;
        ssl_protocols           TLSv1.3;

        access_log /var/log/nginx/vps.myserver.domain.access.log;
        error_log /var/log/nginx/vps.myserver.domain.error.log;

        location / {
                proxy_pass http://homewebapp.myserver.domain;
        }
}

홈프록시(nginx) /etc/nginx/sites-enabled/webapp:

server {
        listen 80;
        server_name homewebapp.myserver.domain;
        location / {
                proxy_pass http://internal_webapp.domain;
        }

        access_log /var/log/nginx/homewebapp.myserver.domain.access.log;
        error_log /var/log/nginx/homewebapp.myserver.domain.error.log;

}

home.webserver1(nginx) /etc/nginx/sites-enabled/webapp:

server {
        listen 80 default_server;
        root /var/www/html/webapp/;
        index index.html index.htm index.nginx-debian.html;
        server_name internal_webapp.domain;
        index index.php;
        location / {
                try_files $uri $uri/ /index.php$is_args$args;
        }
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_index index.php;
                include fastcgi_params;
        }
        # Deny access to the directory data
        location ~* /data {
                deny all;
                return 404;
        }
        # Deny access to .htaccess
        location ~ /\.ht {
                deny all;
                return 404;
        }
}

NGINX 구성의 나머지 부분은 기본값입니다.

또한 실제 IP 등을 얻기 위해 구성에서 Proxy_set_header를 가지고 놀았지만 Opera GX가 왜 그렇게 동작하는지 찾지 못했습니다. 나는 조금 검색했지만 Opera GX가 모든 사이트에서 튀어나온 2017년의 오래된 스레드에 대해 아무것도 찾지 못했지만 이 경우 다른 모든 것은 내 웹사이트에서만 작동하지 않습니다.

Opera GX에서는 애드온을 활성화하지 않거나 Adblock/Tracker Blocker를 활성화하지 않고 새로운 프로필을 사용하여 시도했습니다.

내가 가진 질문은 다음과 같습니다.

이것이 내 NGINX의 잘못된 구성입니까, 아니면 단지 Opera GX가 이상한 것입니까? 내 NGINX인 경우 이 문제를 어떻게 해결합니까? Opera GX라면 버그 추적기 어딘가에 이슈가 있는 것 같은데요?

답변1

기본 브라우저를 전환하고 얼마 후 이제 작동합니다... 이유는 모르겠습니다. 또한 Safari를 테스트했는데 일부 모바일 브라우저가 모두 완벽하게 작동했습니다. 여기서 Opera GX가 어떤 점을 다른지 모르겠습니다. 갑자기 작동했을 때 버그 보고서를 작성하고 있었습니다.

default_server또한 뒤에 다른 구성을 추가했는데 listen $PORT;이상한 인증서 오류가 발생했습니다. 그것들도 사라졌습니다. 일종의 캐시인지는 모르겠습니다.

관련 정보