Some CSS files not found

1. The problem I’m having:

I’m trying to put my Reolink Home Hub behind a reverse proxy but when I do it throws a bunch of 404 Not Found errors for some of CSS & JS files that I can navigate to when using the IP. EG http://192.168.2.192/css/index.css displays the css file but https://cameras.nosdivad.net/css/index.css returns a 404.
What’s strange is that another css file in the same folder (/css/channel.css) is found using both the IP & the reverse proxy subdomain.
I’m using a subdomain, not a path so it’s not the classic subfolder problem (also, some files in the folders are found while others aren’t).
The two links in the html head look to be formulated the same (no additional forward slashes)

2. Error messages and/or full log output:

ersion":772,"cipher_suite":4867,"proto":"h2","server_name":"cameras.nosdivad.net"}},"headers":{"Date":["Tue, 19 Aug 2025 10:20:12 GMT"],"Content-Type":["application/javascript"],"Last-Modified":["Thu, 26 Sep 2024 08:31:34 GMT"],"Etag":["\"66f51be6-8bd\""],"X-Frame-Options":["SAMEORIGIN"],"X-Xss-Protection":["1; mode=block"],"X-Content-Type-Options":["nosniff"],"Content-Length":["2237"],"Connection":["keep-alive"],"Accept-Ranges":["bytes"]},"status":200}
Aug 19 11:20:12 pihole caddy[352798]: {"level":"debug","ts":1755598812.001483,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.2.192:80","duration":0.004644592,"request":{"remote_ip":"213.83.119.209","remote_port":"42372","client_ip":"213.83.119.209","proto":"HTTP/2.0","method":"GET","host":"cameras.nosdivad.net","uri":"/js/flash.js?timeVersion=1725606374935","headers":{"Accept-Language":["en-GB,en;q=0.9"],"Referer":["https://cameras.nosdivad.net/"],"Priority":["u=1"],"Accept":["*/*"],"Sec-Fetch-Mode":["no-cors"],"Sec-Fetch-Site":["same-origin"],"Sec-Ch-Ua-Platform":["\"Windows\""],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["cameras.nosdivad.net"],"Via":["2.0 Caddy"],"Cache-Control":["no-cache"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"],"Sec-Ch-Ua-Mobile":["?0"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Sec-Ch-Ua":["\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Google Chrome\";v=\"138\""],"Cookie":["REDACTED"],"X-Forwarded-For":["213.83.119.209"],"Sec-Fetch-Dest":["script"],"Pragma":["no-cache"]},"tls":{"resumed":false,"version":772,"cipher_suite":4867,"proto":"h2","server_name":"cameras.nosdivad.net"}},"headers":{"Date":["Tue, 19 Aug 2025 10:20:12 GMT"],"Content-Type":["text/html"],"Content-Length":["548"],"Connection":["keep-alive"]},"status":404}
Aug 19 11:20:12 pihole caddy[352798]: {"level":"debug","ts":1755598812.0023086,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.2.192:80","duration":0.003585163,"request":{"remote_ip":"213.83.119.209","remote_port":"42372","client_ip":"213.83.119.209","proto":"HTTP/2.0","method":"GET","host":"cameras.nosdivad.net","uri":"/swf/swfobject.js?timeVersion=1725606374935","headers":{"Cookie":["REDACTED"],"Sec-Ch-Ua":["\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Google Chrome\";v=\"138\""],"Priority":["u=1"],"Sec-Ch-Ua-Mobile":["?0"],"Pragma":["no-cache"],"Sec-Fetch-Site":["same-origin"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Sec-Fetch-Mode":["no-cors"],"Accept-Language":["en-GB,en;q=0.9"],"Via":["2.0 Caddy"],"Referer":["https://cameras.nosdivad.net/"],"Accept":["*/*"],"Sec-Ch-Ua-Platform":["\"Windows\""],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"],"Sec-Fetch-Dest":["script"],"Cache-Control":["no-cache"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["cameras.nosdivad.net"],"X-Forwarded-For":["213.83.119.209"]},"tls":{"resumed":false,"version":772,"cipher_suite":4867,"proto":"h2","server_name":"cameras.nosdivad.net"}},"headers":{"Date":["Tue, 19 Aug 2025 10:20:12 GMT"],"Content-Type":["text/html"],"Content-Length":["548"],"Connection":["keep-alive"]},"status":404}
Aug 19 11:20:12 pihole caddy[352798]: {"level":"debug","ts":1755598812.0030754,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.2.192:80","total_upstreams":1}
Aug 19 11:20:12 pihole caddy[352798]: {"level":"debug","ts":1755598812.0039597,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.2.192:80","duration":0.0035636,"request":{"remote_ip":"213.83.119.209","remote_port":"42372","client_ip":"213.83.119.209","proto":"HTTP/2.0","method":"GET","host":"cameras.nosdivad.net","uri":"/js/PlayerPlayback.js?timeVersion=1725606374935","headers":{"Pragma":["no-cache"],"Sec-Ch-Ua-Platform":["\"Windows\""],"Accept":["*/*"],"Referer":["https://cameras.nosdivad.net/"],"Sec-Ch-Ua-Mobile":["?0"],"X-Forwarded-Host":["cameras.nosdivad.net"],"Priority":["u=1"],"Accept-Encoding":["gzip, deflate, br, zstd"],"X-Forwarded-For":["213.83.119.209"],"Cookie":["REDACTED"],"Sec-Fetch-Site":["same-origin"],"Sec-Fetch-Mode":["no-cors"],"Cache-Control":["no-cache"],"X-Forwarded-Proto":["https"],"Via":["2.0 Caddy"],"Accept-Language":["en-GB,en;q=0.9"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"],"Sec-Ch-Ua":["\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Google Chrome\";v=\"138\""],"Sec-Fetch-Dest":["script"]},"tls":{"resumed":false,"version":772,"cipher_suite":4867,"proto":"h2","server_name":"cameras.nosdivad.net"}},"headers":{"Date":["Tue, 19 Aug 2025 10:20:12 GMT"],"Content-Type":["text/html"],"Content-Length":["548"],"Connection":["keep-alive"]},"status":404}
Aug 19 11:20:12 pihole caddy[352798]: {"level":"debug","ts":1755598812.004121,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.2.192:80","total_upstreams":1}
Aug 19 11:20:12 pihole caddy[352798]: {"level":"debug","ts":1755598812.0050735,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.2.192:80","total_upstreams":1}
Aug 19 11:20:12 pihole caddy[352798]: {"level":"debug","ts":1755598812.0060947,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.2.192:80","duration":0.002692505,"request":{"remote_ip":"213.83.119.209","remote_port":"42372","client_ip":"213.83.119.209","proto":"HTTP/2.0","method":"GET","host":"cameras.nosdivad.net","uri":"/js/accountLogin.a20ea7d4.js","headers":{"Sec-Ch-Ua":["\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Google Chrome\";v=\"138\""],"X-Forwarded-For":["213.83.119.209"],"Sec-Fetch-Dest":["script"],"Pragma":["no-cache"],"Sec-Ch-Ua-Mobile":["?0"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Sec-Fetch-Mode":["no-cors"],"Priority":["u=1"],"Cache-Control":["no-cache"],"Sec-Ch-Ua-Platform":["\"Windows\""],"Accept-Language":["en-GB,en;q=0.9"],"Cookie":["REDACTED"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["cameras.nosdivad.net"],"Via":["2.0 Caddy"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"],"Accept":["*/*"],"Sec-Fetch-Site":["same-origin"],"Referer":["https://cameras.nosdivad.net/"]},"tls":{"resumed":false,"version":772,"cipher_suite":4867,"proto":"h2","server_name":"cameras.nosdivad.net"}},"headers":{"Content-Type":["text/html"],"Content-Length":["548"],"Connection":["keep-alive"],"Date":["Tue, 19 Aug 2025 10:20:12 GMT"]},"status":404}
Aug 19 11:20:12 pihole caddy[352798]: {"level":"debug","ts":1755598812.0072362,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.2.192:80","duration":0.002823808,"request":{"remote_ip":"213.83.119.209","remote_port":"42372","client_ip":"213.83.119.209","proto":"HTTP/2.0","method":"GET","host":"cameras.nosdivad.net","uri":"/js/chunk-vendors.313dbcff.js","headers":{"Cache-Control":["no-cache"],"Referer":["https://cameras.nosdivad.net/"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Sec-Ch-Ua-Mobile":["?0"],"Cookie":["REDACTED"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"],"X-Forwarded-For":["213.83.119.209"],"X-Forwarded-Host":["cameras.nosdivad.net"],"Via":["2.0 Caddy"],"Sec-Ch-Ua":["\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Google Chrome\";v=\"138\""],"Sec-Fetch-Dest":["script"],"Sec-Fetch-Site":["same-origin"],"X-Forwarded-Proto":["https"],"Accept":["*/*"],"Accept-Language":["en-GB,en;q=0.9"],"Sec-Fetch-Mode":["no-cors"],"Pragma":["no-cache"],"Sec-Ch-Ua-Platform":["\"Windows\""],"Priority":["u=1"]},"tls":{"resumed":false,"version":772,"cipher_suite":4867,"proto":"h2","server_name":"cameras.nosdivad.net"}},"headers":{"Date":["Tue, 19 Aug 2025 10:20:12 GMT"],"Content-Type":["text/html"],"Content-Length":["548"],"Connection":["keep-alive"]},"status":404}
Aug 19 11:20:12 pihole caddy[352798]: {"level":"debug","ts":1755598812.0072246,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.2.192:80","duration":0.001909483,"request":{"remote_ip":"213.83.119.209","remote_port":"42372","client_ip":"213.83.119.209","proto":"HTTP/2.0","method":"GET","host":"cameras.nosdivad.net","uri":"/img/logo.png","headers":{"Sec-Fetch-Mode":["no-cors"],"Priority":["u=2, i"],"Accept":["image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8"],"Via":["2.0 Caddy"],"Sec-Fetch-Dest":["image"],"Sec-Ch-Ua":["\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Google Chrome\";v=\"138\""],"Sec-Ch-Ua-Platform":["\"Windows\""],"X-Forwarded-Host":["cameras.nosdivad.net"],"Sec-Ch-Ua-Mobile":["?0"],"Cookie":["REDACTED"],"Accept-Language":["en-GB,en;q=0.9"],"Accept-Encoding":["gzip, deflate, br, zstd"],"X-Forwarded-Proto":["https"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"],"Pragma":["no-cache"],"Sec-Fetch-Site":["same-origin"],"Referer":["https://cameras.nosdivad.net/"],"Cache-Control":["no-cache"],"X-Forwarded-For":["213.83.119.209"]},"tls":{"resumed":false,"version":772,"cipher_suite":4867,"proto":"h2","server_name":"cameras.nosdivad.net"}},"headers":{"Content-Length":["2682"],"Connection":["keep-alive"],"X-Frame-Options":["SAMEORIGIN"],"X-Xss-Protection":["1; mode=block"],"Content-Type":["image/png"],"Last-Modified":["Thu, 26 Sep 2024 08:31:34 GMT"],"Etag":["\"66f51be6-a7a\""],"X-Content-Type-Options":["nosniff"],"Accept-Ranges":["bytes"],"Date":["Tue, 19 Aug 2025 10:20:12 GMT"]},"status":200}
Aug 19 11:20:12 pihole caddy[352798]: {"level":"debug","ts":1755598812.2420938,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.2.192:80","total_upstreams":1}
Aug 19 11:20:12 pihole caddy[352798]: {"level":"debug","ts":1755598812.2458773,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.2.192:80","duration":0.003105579,"request":{"remote_ip":"213.83.119.209","remote_port":"42372","client_ip":"213.83.119.209","proto":"HTTP/2.0","method":"GET","host":"cameras.nosdivad.net","uri":"/img/allbg.png","headers":{"Sec-Ch-Ua-Mobile":["?0"],"Accept":["image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8"],"Cache-Control":["no-cache"],"Cookie":["REDACTED"],"X-Forwarded-For":["213.83.119.209"],"X-Forwarded-Proto":["https"],"Referer":["https://cameras.nosdivad.net/css/skin.css?timeVersion=1725606374935"],"Sec-Fetch-Dest":["image"],"X-Forwarded-Host":["cameras.nosdivad.net"],"Via":["2.0 Caddy"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Pragma":["no-cache"],"Sec-Ch-Ua":["\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Google Chrome\";v=\"138\""],"Priority":["u=1, i"],"Sec-Fetch-Mode":["no-cors"],"Accept-Language":["en-GB,en;q=0.9"],"Sec-Ch-Ua-Platform":["\"Windows\""],"Sec-Fetch-Site":["same-origin"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"]},"tls":{"resumed":false,"version":772,"cipher_suite":4867,"proto":"h2","server_name":"cameras.nosdivad.net"}},"headers":{"Content-Length":["1600"],"Connection":["keep-alive"],"X-Frame-Options":["SAMEORIGIN"],"X-Xss-Protection":["1; mode=block"],"Content-Type":["image/png"],"Last-Modified":["Thu, 26 Sep 2024 08:31:34 GMT"],"Etag":["\"66f51be6-640\""],"X-Content-Type-Options":["nosniff"],"Accept-Ranges":["bytes"],"Date":["Tue, 19 Aug 2025 10:20:13 GMT"]},"status":200}
Aug 19 11:20:12 pihole caddy[352798]: {"level":"debug","ts":1755598812.3837235,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.2.192:80","total_upstreams":1}
Aug 19 11:20:12 pihole caddy[352798]: {"level":"debug","ts":1755598812.386431,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.2.192:80","duration":0.002296046,"request":{"remote_ip":"213.83.119.209","remote_port":"42372","client_ip":"213.83.119.209","proto":"HTTP/2.0","method":"GET","host":"cameras.nosdivad.net","uri":"/favicon.ico","headers":{"Priority":["u=1, i"],"Pragma":["no-cache"],"Sec-Fetch-Mode":["no-cors"],"Accept":["image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8"],"Sec-Ch-Ua":["\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Google Chrome\";v=\"138\""],"Via":["2.0 Caddy"],"Sec-Ch-Ua-Mobile":["?0"],"Accept-Language":["en-GB,en;q=0.9"],"Sec-Ch-Ua-Platform":["\"Windows\""],"X-Forwarded-Host":["cameras.nosdivad.net"],"Sec-Fetch-Dest":["image"],"Cookie":["REDACTED"],"Referer":["https://cameras.nosdivad.net/"],"X-Forwarded-For":["213.83.119.209"],"X-Forwarded-Proto":["https"],"Accept-Encoding":["gzip, deflate, br, zstd"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"],"Sec-Fetch-Site":["same-origin"],"Cache-Control":["no-cache"]},"tls":{"resumed":false,"version":772,"cipher_suite":4867,"proto":"h2","server_name":"cameras.nosdivad.net"}},"headers":{"X-Xss-Protection":["1; mode=block"],"Date":["Tue, 19 Aug 2025 10:20:13 GMT"],"Content-Type":["image/x-icon"],"Last-Modified":["Thu, 26 Sep 2024 08:31:34 GMT"],"X-Content-Type-Options":["nosniff"],"Accept-Ranges":["bytes"],"Content-Length":["1150"],"Connection":["keep-alive"],"Etag":["\"66f51be6-47e\""],"X-Frame-Options":["SAMEORIGIN"]},"status":200}

3. Caddy version:

v2.10.0 h1:fonubSaQKF1YANl8TXqGcn4IbIRUDdfAkpcsfI/vX5U=

4. How I installed and ran Caddy:

a. System environment:

RPi 4
Linux version 6.1.21-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023
Installed using the offical instructions here Install — Caddy Documentation and running as a systemctl service

b. Command:

[Unit]
Description=Caddy
Documentation=https://caddyserver.com/docs/
After=network.target network-online.target
Requires=network-online.target

[Service]
Type=notify
User=caddy
Group=caddy
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile --force
TimeoutStopSec=5s
LimitNOFILE=1048576
PrivateTmp=true
ProtectSystem=full
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE

[Install]
WantedBy=multi-user.target

c. Service/unit/compose file:

[Unit]
Description=Caddy
Documentation=https://caddyserver.com/docs/
After=network.target network-online.target
Requires=network-online.target

[Service]
Type=notify
User=caddy
Group=caddy
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile --force
TimeoutStopSec=5s
LimitNOFILE=1048576
PrivateTmp=true
ProtectSystem=full
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE

[Install]
WantedBy=multi-user.target

d. My complete Caddy config:

# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.

# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile
{
        debug
}
mythtv.nosdivad.net {
        reverse_proxy 192.168.2.100:6544
}
webmin.nosdivad.net {
        reverse_proxy 192.168.2.100:10000 {
                transport http {
                        tls
                        tls_insecure_skip_verify
                }
        }
}
vwsfriend.nosdivad.net {
        reverse_proxy 192.168.2.115:3000
}
homeassistant.nosdivad.net {
        reverse_proxy 192.168.2.115:8123
}
nextpvr.nosdivad.net {
        reverse_proxy 192.168.2.115:8866
}
music.nosdivad.net {
        reverse_proxy 192.168.2.115:8095
}
cameras.nosdivad.net {
        reverse_proxy 192.168.2.192
}

5. Links to relevant resources:

curl -v https://cameras.nosdivad.net/css/index.css
* About to connect() to cameras.nosdivad.net port 443 (#0)
*   Trying 84.71.151.111... connected
* Connected to cameras.nosdivad.net (84.71.151.111) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
* Server certificate:
* 	subject: CN=cameras.nosdivad.net
* 	start date: Aug 18 09:17:21 2025 GMT
* 	expire date: Nov 16 09:17:20 2025 GMT
* 	common name: cameras.nosdivad.net
* 	issuer: CN=E5,O=Let's Encrypt,C=US
> GET /css/index.css HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.44 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: cameras.nosdivad.net
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Alt-Svc: h3=":443"; ma=2592000
< Content-Length: 146
< Content-Type: text/html
< Date: Tue, 19 Aug 2025 16:13:10 GMT
< Via: 1.1 Caddy
<
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #0 to host cameras.nosdivad.net left intact
* Closing connection #0

That’s not Caddy returning 404, that’s your Nginx doing it:

<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

Hi,

Thanks for that - I know it’s ngix returning the 404, but it only does it when behind the Caddy proxy (not sure it’s a Caddy problem, but a bit odd).

http://192.168.2.192/css/index.css (on the LAN) returns the file (status 200)

https://cameras.nosdivad.net/css/index.css (both on LAN & WAN) returns the 404 error

but

both http://192.168.2.192/css/channel.css and https://cameras.nosdivad.net/css/channel.css return the file (status 200)

Why would only some files not be found behind the reverse proxy but others (in the same directory) are?

Look at the Nginx logs to see if there’s anything obvious that Nginx might complain about.

If you’re saying that everything works when accessed via 192.168.2.192, see if using that as a header_up Host value would make any difference.

You can also try:

curl -v http://192.168.1.192/css/index.css -H ‘Host: cameras.nosdivad.net'

to see what you get.

I can’t access the Ngix host unfortunately as it’s the webserver built into my Reolink Home Hub.

The header_up change didn’t work I’m afraid.

curl -v http://192.168.2.192/css/index.css -H ‘Host: cameras.nosdivad.net’ returns

$ curl -v http://192.168.2.192/css/index.css -H 'Host: cameras.nosdivad.net'
*   Trying 192.168.2.192:80...
* Connected to 192.168.2.192 (192.168.2.192) port 80 (#0)
> GET /css/index.css HTTP/1.1
> Host: cameras.nosdivad.net
> User-Agent: curl/7.74.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Date: Tue, 19 Aug 2025 17:13:53 GMT
< Content-Type: text/html
< Content-Length: 146
< Connection: keep-alive
<
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #0 to host 192.168.2.192 left intact

but curl -v http://192.168.2.192/css/channel.css -H ‘Host: cameras.nosdivad.net’ returns

$ curl -v http://192.168.2.192/css/channel.css -H 'Host: cameras.nosdivad.net'
*   Trying 192.168.2.192:80...
* Connected to 192.168.2.192 (192.168.2.192) port 80 (#0)
> GET /css/channel.css HTTP/1.1
> Host: cameras.nosdivad.net
> User-Agent: curl/7.74.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Tue, 19 Aug 2025 17:15:40 GMT
< Content-Type: text/css
< Content-Length: 1225
< Last-Modified: Thu, 26 Sep 2024 08:31:34 GMT
< Connection: keep-alive
< ETag: "66f51be6-4c9"
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< Accept-Ranges: bytes
<
.channel{position:absolute;border:2px solid #000;border-style:inset;height:100%;float:left;left:0;top:0;display:none;z-index:11}.channel,.pbchannel,.toolbar{width:100%;color:#fff;-webkit-user-select:none;-moz-user-select:none}.toolbar{position:relative;height:27px;font-size:15px;line-height:25px;background-color:#4f4f4f;filter:alpha(opacity=50);-moz-opacity:.5;opacity:.5;z-index:111}.pbchannel{position:absolute;border:2px solid #000;height:100%;float:left;display:none;z-index:11}.pbtoolbar,.streamType{height:27px;-webkit-user-select:none}.pbtoolbar{position:relative;width:100%;font-size:15px;line-height:25px;color:#fff;background-color:#4f4f4f;-moz-user-select:none;filter:alpha(opacity=50);-moz-opacity:.5;opacity:.5;z-index:111}.streamType{position:absolute;width:200px;left:43px;top:0;z-index:999}.centerItem,.statusItem{-webkit-user-select:none;-moz-user-select:none}.statusItem{position:absolute;text-align:center;vertical-align:middle;background-repeat:no-repeat;overflow:hidden;display:table-cell;z-index:999}* Connection #0 to host 192.168.2.192 left intact
.centerItem{position:relative;top:0}.fplayer{position:absolute!important}.flashCell{border:1px solid #ccc}.loadingWaiter{height:128px;width:128px;position:absolute;z-index:999;-webkit-user-select:none}

Interestingly curl -v http://192.168.2.192/css/index.css returns the 404 error as well, but if I put that url (with the IP) in my browser it shows me the css file. It’s almost as if the browser is getting redirected but curl isn’t?!?

Can you show me exactly how you used header_up?

^ Here you’re talking directly to Nginx; Caddy isn’t involved.

Please share that full response. If you get 404 for that curl too, then it makes sense that header_up has no effect.

You might be seeing cached content in the browser. Try clearing the cache or using an incognito window and check again.

All I can say at this point, based on your curl results, is that the problem lies with Nginx. Since we don’t have access to its configuration or logs, it’s mostly guesswork from here.

Doesn’t look like it’s cached as I can still see the file in an incognito tab. Here’s the full curl result for the IP without the Host

$ curl -v http://192.168.2.192/css/index.css
*   Trying 192.168.2.192:80...
* Connected to 192.168.2.192 (192.168.2.192) port 80 (#0)
> GET /css/index.css HTTP/1.1
> Host: 192.168.2.192
> User-Agent: curl/7.74.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Date: Tue, 19 Aug 2025 23:16:10 GMT
< Content-Type: text/html
< Content-Length: 146
< Connection: keep-alive
<
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #0 to host 192.168.2.192 left intact

Very strange that it’s only some files and it works in a browser but not using curl!

Alright, in that case you’ll need to figure out why Nginx responds with the CSS file when the site is loaded in a browser. curl doesn’t cache requests, and Caddy doesn’t cache by default either, so both behave a lot like curl from Nginx’s perspective.

Try playing with curl and see if changing the user agent makes a difference. Use the same user agent string your browser sends and compare the responses.

Open your browser’s Inspect window, go to the Network tab, and check the Request Headers your browser sends to Nginx. See if any of those headers change the outcome when you add them to curl. In the Network tab you can also right click the CSS request that 404s and choose Copy as cURL. That will give you a curl command that pretends to be your browser. Run it and compare the response.

That’s pretty much all I can suggest at this point to help you with troubleshooting.

Thanks for your suggestions timelordx - I’ll give them a go!

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