Score:1

NGINX reverse proxy works on all browsers except Opera GX - what is causing the issue?

je flag

Hello I have a weird problem when browsing to my selfhosted Website:

when I browse to my VPS Domain (which should proxy it to my homeproxy (nginx) and then to home webserver1) on Edge/Chrome/Firefox/Chromium it works as expected. when I do the same on Opera GX the URL rewrites it to: https://internal_web.domain/ which then gets a DNS error since the domain I use internally doesnt exist outside my network. On the internal Webserver I just host Kanboard. The same happens if I just serve a index.html with hello world.

All 3 Servers are: Ubuntu 22.04 nginx version: nginx/1.18.0 (Ubuntu)

for the Internal Domain I have /etc/hosts entrys on all Machines and all resolve it correctly.

In Opera GX I only have the Tracker and Ad Block on and VPN off. My DNS is set to 8.8.8.8 and secondary 8.8.4.4.

Opera GX Version: LVL4 (core: 98.0.4759.82) Update-Stream: Early Access Operating System: Windows 11 64-bit Chromium-Version: 112.0.5615.165

I masked all IPs / Domains in the Configs.

VPS -> homeproxy(nginx) -> home.webserver1(nginx)

VPS Config /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;
        }
}

homeproxy(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;
        }
}

The rest of the NGINX config is default.

I also played around with proxy_set_header in the config to get the real IP etc. but i havent found out why Opera GX does behave like that. I googled around a bit but found nothing about that just an old thread from 2017 where Opera GX spazzed out on every site but in this case everything else works just my website doesnt.

On Opera GX I also tried it with a fresh Profile no Addons enabled or Adblock / Tracker Blocker enabled.

The question I have is:

Is this a misconfiguration of my NGINXs or just Opera GX beeing weird? If its my NGINXs how would I resolve this Issue? If its Opera GX I guess I open an Issue on their Bug Tracker somewhere?

lxhom avatar
md flag
I don't use Opera GX, but IIRC it has a built-in VPN thing which might mess with stuff. Also, have you tried it with vanilla Opera?
manu1337 avatar
je flag
Vanilla Opera also works fine. I played around with the VPN settings on/off already, sadly it didnt change anything.
uz flag
[VPN in Opera is very useful and great. But the only improvement I think would be in order is implementing extra modes to use VPN in. Currently it's either ON everywhere or OFF everywhere](https://forums.opera.com/topic/31628/add-custom-bypass-url-s-for-vpn#:~:text=VPN%20in%20Opera%20is%20very%20useful%20and%20great.%20But%20the%20only%20improvement%20I%20think%20would%20be%20in%20order%20is%20implementing%20extra%20modes%20to%20use%20VPN%20in.%20Currently%20it%27s%20either%20ON%20everywhere%20or%20OFF%20everywhere.). When info on that link is still correct, you are out of luck....
Score:1
je flag

After I switched my default Browser and some time it now works... I don't know why. I also tested Safari and some Mobile Browsers all worked perfectly. I don't know what Opera GX does different here. I was writing a Bug report for it when it suddenly worked.

I also added another config with the default_server after the listen $PORT; and I got some weird certificate errors. Those are gone aswell. I don't know if its some sort of cache or something.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.