webmin / authentic-theme

Official theme for the best server management panel of the 21st Century
https://authentic-theme.com
MIT License
947 stars 163 forks source link

Night mode won't stick on this one VPS #1655

Closed julioasoares closed 1 year ago

julioasoares commented 1 year ago
SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.2
Webmin version 2.021
Authentic Theme version 20.21
Processor information AMD EPYC 7282 16-Core Processor, 4 cores

I have this one VPS instance where night mode would not ‘survive’ once we navigate or refresh pages. Additionaly the graphics on System Information show blurred and without colors in dark mode.

Toggling night/day mode works inconsistently (don’t always toggles) both with shortcut or icons and navigating to any tab or page will turn night mode off but leave the blurred graphics behind. If we refresh the page the graphics would come back normal (in day mode only).

I have 3 other VPS instances working fine. I know it probably means nothing but the only difference is that the other VPSs are all Intel Xeon VMs.

This is how it looks when "normal" image

Then if toggling to night mode... image

Toggling back... image

If I refresh the page anytime it goes day mode with the normal (sharp and colored) graphics.

Thenak you

iliajie commented 1 year ago

Hello, Julio!

If you open browser's console and toggle day/night mode -- do you see any errors? Also, if you try another browser (or incognito tab), with all extensions disabled -- does it change anything? Or it just works fine in the same browser but for other servers?

julioasoares commented 1 year ago

It works just fine for the other sites on the same browser. It behaves the same on edge or on Chrome with incognito window

iliajie commented 1 year ago

Excellent! Could you now open browser console and see what errors do you get on switching dark/light modes?

julioasoares commented 1 year ago

four errors: image

julioasoares commented 1 year ago

panel.demimot.com-1686650757375.log panel.demimot.com-1686650781474.log panel.demimot.com-1686650792118.log panel.demimot.com-1686650801679.log

iliajie commented 1 year ago

Is this instance in Cloudflare or behind other proxy? If so, could you tell more about DNS and proxy configuration for the instance that's having an issue?

julioasoares commented 1 year ago

DNS is just a direct A record on marcaria.com. No cloudfare. There is only nginx in front of it as reverse proxy to http://127.0.0.1:10000 The same is true for the other 'normal' webmins. Except!! these have apache reverse proxy... could it be something here?

server {
    listen    443    ssl;
    server_name panel.demimot.com;

    ssl_certificate     /home/user-data/ssl/panel.demimot.com.cert.pem;
    ssl_certificate_key /home/user-data/ssl/panel.demimot.com.privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:10000/;
    }

    location /.well-known/acme-challenge/ {
        alias /home/user-data/ssl/lets_encrypt/webroot/.well-known/acme-challenge/;
    }
}
iliajie commented 1 year ago

Please follow this guide to setup Apache gateway for Webmin:

https://webmin.com/faq/#can-i-run-webmin-or-usermin-behind-reverse-proxy

julioasoares commented 1 year ago

I adjusted certificate paths, server name, etc. to suit my setup but all I get is a "502 bad gateway" error.

iliajie commented 1 year ago

This is not the theme issue!

I adjusted certificate paths, server name, etc. to suit my setup but all I get is a "502 bad gateway" error.

This error indicates that Apache proxy did not receive a valid response from the Webmin backend server.