Proxy Paths & CSS issues

SYSTEM INFORMATION
OS type and version Debian 12
Virtualmin version 7.20.2 Pro

I seem to be having the same problem as No CSS when using reverse proxy?. This is a new fairly new VM install, maybe 2 months old. I’ve not messed with any internal files, nor changed any configs outside of the VM frontend. I’m sure this is related to something I’m not setting right, but after searching for weeks I simply can’t seem to figure out why anything running inside Docker (yes… I know, and I’m sorry) doesn’t display properly. If this has been answered, please point me in the right direction. Thanks!

My proxy paths are are as follows:

/portainer      https://localhost:9443     This works perfectly.
/myerp          http://localhost:8080      This displays, but without CSS.

There are no log errors that I can find. Changing /myerp to https://localhost:8080 displays “Proxy Error: Error during SSL Handshake with remote server”

Results can be seen here: Login

maybe post your config file.
I don’t know much about the subject but googling some say the maybe a missing forward slash on the end of the proxy_pass line.

Or maybe its the other way round, try both with and without the end forward slash see it fixes it.

ok I see the css under the myerp directory

https://corridor9design.com/myerp/assets/frappe/dist/css/website.bundle.VHCMTY4M.css

where in the code its not, I hope the proxy_pass line will fix the issue.

also you could try / http://localhost:8080 instead of /myerp http://localhost:8080

Here are the logs that I was able to pull this morning:

ip.addr - - [15/Oct/2024:11:20:59 +0000] "GET /assets/erpnext/dist/js/erpnext-web.bundle.J4A2DQB4.js HTTP/2.0" 404 224 "https://corridor9design.com/myerp/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:59 +0000] "GET /website_script.js HTTP/2.0" 404 224 "https://corridor9design.com/myerp/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:59 +0000] "GET /assets/frappe/dist/js/frappe-web.bundle.AXFNRB25.js HTTP/2.0" 404 224 "https://corridor9design.com/myerp/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:59 +0000] "GET /assets/erpnext/images/erpnext-logo.svg HTTP/2.0" 404 224 "https://corridor9design.com/myerp/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:59 +0000] "GET /assets/erpnext/dist/js/erpnext-web.bundle.J4A2DQB4.js HTTP/2.0" 404 224 "https://corridor9design.com/myerp/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:59 +0000] "GET /website_script.js HTTP/2.0" 404 224 "https://corridor9design.com/myerp/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:59 +0000] "GET /assets/frappe/dist/js/frappe-web.bundle.AXFNRB25.js HTTP/2.0" 404 224 "https://corridor9design.com/myerp/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:59 +0000] "GET /assets/frappe/dist/css/login.bundle.AS3GZO4Y.css HTTP/2.0" 404 224 "https://corridor9design.com/myerp/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:59 +0000] "GET /assets/erpnext/dist/css/erpnext-web.bundle.MAUEW67A.css HTTP/2.0" 404 224 "https://corridor9design.com/myerp/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:59 +0000] "GET /assets/frappe/dist/css/website.bundle.VHCMTY4M.css HTTP/2.0" 404 247 "https://corridor9design.com/myerp/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:58 +0000] "GET /website_script.js HTTP/2.0" 404 260 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:58 +0000] "GET /assets/erpnext/dist/js/erpnext-web.bundle.J4A2DQB4.js HTTP/2.0" 404 287 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:58 +0000] "GET /assets/frappe/dist/css/login.bundle.AS3GZO4Y.css HTTP/2.0" 404 282 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:58 +0000] "GET /assets/erpnext/dist/css/erpnext-web.bundle.MAUEW67A.css HTTP/2.0" 404 287 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:58 +0000] "GET /assets/frappe/dist/js/frappe-web.bundle.AXFNRB25.js HTTP/2.0" 404 285 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:58 +0000] "GET /assets/frappe/dist/css/website.bundle.VHCMTY4M.css HTTP/2.0" 404 521 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"
ip.addr - - [15/Oct/2024:11:20:58 +0000] "GET /myerp/ HTTP/2.0" 200 97929 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0"

I’m not very familiar with proxying. Why does the /myerp/ get passed correctly, but the failed lines above it don’t have /myerp/ prepending the line?

After examining the logs above, I tried creating a sub-server and changed the settings on the “Edit Proxy Website” configuration page to Allow Proxy: yes and Proxy to URL: http://localhost:8080/. This configuration worked perfectly.

I don’t mind using a sub-server since this all I do is host my small business and a few personal gaming servers, but I am still left wondering what I’m doing wrong just trying to use the proxy paths. Thoughts?

2 Likes

Arrrggggh… Now I’m getting the exact same thing again with another stack. Even with a sub-server. I don’t even know where to start troubleshooting. Help with this would be greatly appreciated.

@Rescue9,

What is the purpose for this Proxy? Why are the proxies needed in your setup. Curious.

@tpnsolutions It’s a Docker container.

@Rescue9,

Gotcha… Did you expose the docker port?

A sub-server or a top-level server should be irrelevant. Something weird is happening, if it behaves differently, but I’m having a hard time figuring out what. And, CSS is just another web request, there is nothing special about it…HTML, CSS, and JavaScript and images are all just files. If anything works, everything should work.

So, I guess there’s something weird about the path (i.e. in a directory), or maybe there’s something in your app sucking up the requests and munging them somehow? Redirects or something?

Yea, I’m at a loss as well. Three different docker applications have done this for some reason. As mentioned, I’m sure it’s something I’m setting wrong somehow. I just don’t know what.

I’m about done trying to figure out docker right now. I’ve spent too much time trying to test various applications that I’m behind on other tasks. Think I’ll just wait for VM to release the docker integration that’s been talked and take the time to catch up on other tasks. Thanks guys!

@Rescue9,

When accessing the proxy’s, are you seeing anything inside the logs of the Docker?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.