1. Caddy version (caddy version
):
2.5.2
2. How I run Caddy:
I run it as a Docker image on a QNAP NAS. I have a config directory and a data directory mounted, per the instructions here: Docker Hub
a. System environment:
QNAP Container Station (docker)
b. Command:
Per Container Station, it’s:
caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
c. Service/unit/compose file:
Handled by Container Station; I don’t see it.
d. My complete Caddyfile or JSON config:
tfprometheus.myvnc.com
handle_path /modixcam/* {
reverse_proxy 192.168.1.39:81
}
handle /* {
reverse_proxy 192.168.1.123:80
}
{
debug
}
log {
output file /data/access.log
}
basicauth {
username passwordhash
}
3. The problem I’m having:
I’m trying to put Klipper, specifically Mainsail, behind a reverse proxy and secure it with basic authentication. (These are apps related to 3D printing.) Both paths above work without basic authentication, and the modixcam path works with it. (The modixcam path is just a simple MJPEG video stream, while the default path is a fancy web app.) But the default path loads the web app, but then can’t access the other data it needs to run the app. Looking at the logs, I’m guessing my authentication isn’t being passed along? I don’t know how to make that happen…
4. Error messages and/or full log output:
The app loads, but then it can’t connect to its various components.
2022/07/16 05:35:31.973 error http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/", "headers": {"Accept-Language": ["en-US,en;q=0.9"], "Pragma": ["no-cache"], "Sec-Fetch-Mode": ["navigate"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Sec-Fetch-Site": ["none"], "Sec-Fetch-User": ["?1"], "Cache-Control": ["no-cache"], "Sec-Ch-Ua-Mobile": ["?0"], "Sec-Fetch-Dest": ["document"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Upgrade-Insecure-Requests": ["1"], "Accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "", "duration": 0.000070678, "size": 0, "status": 401, "resp_headers": {"Server": ["Caddy"], "Www-Authenticate": ["Basic realm=\"restricted\""]}}
2022/07/16 05:35:35.634 info http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/", "headers": {"Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "Sec-Fetch-Dest": ["document"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"], "Sec-Fetch-Site": ["none"], "Cache-Control": ["max-age=0"], "Sec-Ch-Ua-Mobile": ["?0"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Sec-Fetch-User": ["?1"], "Accept-Language": ["en-US,en;q=0.9"], "Accept-Encoding": ["gzip, deflate, br"], "Authorization": [], "Upgrade-Insecure-Requests": ["1"], "Sec-Fetch-Mode": ["navigate"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "username", "duration": 0.27912027, "size": 714, "status": 200, "resp_headers": {"Cache-Control": ["no-store, no-cache, must-revalidate"], "Date": ["Sat, 16 Jul 2022 05:35:52 GMT"], "Content-Type": ["text/html"], "Etag": ["W/\"62c6447b-725\""], "Last-Modified": ["Thu, 07 Jul 2022 02:27:07 GMT"], "Vary": ["Accept-Encoding"], "Content-Encoding": ["gzip"], "Server": ["Caddy", "nginx/1.14.2"]}}
2022/07/16 05:35:35.747 info http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/assets/vendor.4ee48f24.css", "headers": {"Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "Sec-Ch-Ua-Mobile": ["?0"], "Accept": ["text/css,*/*;q=0.1"], "Sec-Fetch-Mode": ["no-cors"], "Sec-Fetch-Dest": ["style"], "Referer": ["https://tfprometheus.myvnc.com/"], "Accept-Language": ["en-US,en;q=0.9"], "Authorization": [], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Sec-Fetch-Site": ["same-origin"], "Accept-Encoding": ["gzip, deflate, br"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "username", "duration": 0.058943709, "size": 71853, "status": 200, "resp_headers": {"Content-Encoding": ["gzip"], "Date": ["Sat, 16 Jul 2022 05:35:52 GMT"], "Content-Type": ["text/css"], "Server": ["Caddy", "nginx/1.14.2"], "Vary": ["Accept-Encoding"], "Last-Modified": ["Thu, 07 Jul 2022 02:27:07 GMT"], "Etag": ["W/\"62c6447b-812d4\""]}}
2022/07/16 05:35:35.863 info http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/assets/index.f5d6ee22.js", "headers": {"Authorization": [], "Referer": ["https://tfprometheus.myvnc.com/"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Mode": ["cors"], "Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "Origin": ["https://tfprometheus.myvnc.com"], "Sec-Ch-Ua-Mobile": ["?0"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Accept": ["*/*"], "Sec-Fetch-Dest": ["script"], "Accept-Language": ["en-US,en;q=0.9"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "username", "duration": 0.174675343, "size": 350174, "status": 200, "resp_headers": {"Content-Type": ["application/javascript"], "Date": ["Sat, 16 Jul 2022 05:35:52 GMT"], "Last-Modified": ["Thu, 07 Jul 2022 02:27:07 GMT"], "Vary": ["Accept-Encoding"], "Etag": ["W/\"62c6447b-160564\""], "Content-Encoding": ["gzip"], "Server": ["Caddy", "nginx/1.14.2"]}}
2022/07/16 05:35:35.864 info http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/assets/index.f7b571b2.css", "headers": {"Sec-Ch-Ua-Platform": ["\"Windows\""], "Accept": ["text/css,*/*;q=0.1"], "Sec-Fetch-Dest": ["style"], "Accept-Language": ["en-US,en;q=0.9"], "Accept-Encoding": ["gzip, deflate, br"], "Authorization": [], "Sec-Ch-Ua-Mobile": ["?0"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Mode": ["no-cors"], "Referer": ["https://tfprometheus.myvnc.com/"], "Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "username", "duration": 0.176165715, "size": 11273, "status": 200, "resp_headers": {"Vary": ["Accept-Encoding"], "Etag": ["W/\"62c6447b-b3af\""], "Content-Encoding": ["gzip"], "Server": ["Caddy", "nginx/1.14.2"], "Date": ["Sat, 16 Jul 2022 05:35:52 GMT"], "Last-Modified": ["Thu, 07 Jul 2022 02:27:07 GMT"], "Content-Type": ["text/css"]}}
2022/07/16 05:35:35.890 info http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/assets/vendor.60e31b64.js", "headers": {"Sec-Fetch-Dest": ["script"], "Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "Origin": ["https://tfprometheus.myvnc.com"], "Sec-Ch-Ua-Mobile": ["?0"], "Accept": ["*/*"], "Sec-Fetch-Mode": ["cors"], "Accept-Language": ["en-US,en;q=0.9"], "Accept-Encoding": ["gzip, deflate, br"], "Authorization": [], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Sec-Fetch-Site": ["same-origin"], "Referer": ["https://tfprometheus.myvnc.com/"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "username", "duration": 0.202351711, "size": 555970, "status": 200, "resp_headers": {"Last-Modified": ["Thu, 07 Jul 2022 02:27:07 GMT"], "Vary": ["Accept-Encoding"], "Etag": ["W/\"62c6447b-1ab72e\""], "Content-Encoding": ["gzip"], "Server": ["Caddy", "nginx/1.14.2"], "Date": ["Sat, 16 Jul 2022 05:35:52 GMT"], "Content-Type": ["application/javascript"]}}
2022/07/16 05:35:36.212 info http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/img/icons/favicon-32x32.png", "headers": {"Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Dest": ["image"], "Authorization": [], "Accept": ["image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8"], "Sec-Fetch-Mode": ["no-cors"], "Referer": ["https://tfprometheus.myvnc.com/"], "Accept-Language": ["en-US,en;q=0.9"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Ch-Ua-Mobile": ["?0"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "username", "duration": 0.006811795, "size": 618, "status": 200, "resp_headers": {"Content-Type": ["image/png"], "Server": ["Caddy", "nginx/1.14.2"], "Last-Modified": ["Thu, 07 Jul 2022 02:27:07 GMT"], "Content-Length": ["618"], "Etag": ["\"62c6447b-26a\""], "Accept-Ranges": ["bytes"], "Date": ["Sat, 16 Jul 2022 05:35:52 GMT"]}}
2022/07/16 05:35:36.247 error http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57183", "proto": "HTTP/1.1", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/websocket", "headers": {"Cache-Control": ["no-cache"], "Authorization": [], "Origin": ["https://tfprometheus.myvnc.com"], "Accept-Encoding": ["gzip, deflate, br"], "Connection": ["Upgrade"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Accept-Language": ["en-US,en;q=0.9"], "Sec-Websocket-Key": ["tW7kBteffYv7hU308sY10A=="], "Sec-Websocket-Extensions": ["permessage-deflate; client_max_window_bits"], "Pragma": ["no-cache"], "Sec-Websocket-Version": ["13"], "Upgrade": ["websocket"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "http/1.1", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "username", "duration": 0.014625724, "size": 75, "status": 401, "resp_headers": {"Date": ["Sat, 16 Jul 2022 05:35:52 GMT"], "Content-Type": ["text/html; charset=UTF-8"], "Server": ["Caddy", "nginx/1.14.2"], "Content-Length": ["75"]}}
2022/07/16 05:35:36.388 error http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/fonts/roboto-bold.woff2", "headers": {"Sec-Fetch-Dest": ["font"], "Accept-Encoding": ["gzip, deflate, br"], "Origin": ["https://tfprometheus.myvnc.com"], "Sec-Ch-Ua-Mobile": ["?0"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Sec-Fetch-Site": ["same-origin"], "Referer": ["https://tfprometheus.myvnc.com/assets/index.f7b571b2.css"], "Accept-Language": ["en-US,en;q=0.9"], "Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Accept": ["*/*"], "Sec-Fetch-Mode": ["cors"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "", "duration": 0.000051167, "size": 0, "status": 401, "resp_headers": {"Server": ["Caddy"], "Www-Authenticate": ["Basic realm=\"restricted\""]}}
2022/07/16 05:35:36.389 error http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/img/sidebar-background.svg", "headers": {"Sec-Fetch-Dest": ["image"], "Referer": ["https://tfprometheus.myvnc.com/"], "Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "Sec-Ch-Ua-Mobile": ["?0"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Accept": ["image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Mode": ["no-cors"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Accept-Language": ["en-US,en;q=0.9"], "Accept-Encoding": ["gzip, deflate, br"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "", "duration": 0.000027103, "size": 0, "status": 401, "resp_headers": {"Www-Authenticate": ["Basic realm=\"restricted\""], "Server": ["Caddy"]}}
2022/07/16 05:35:36.389 error http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/fonts/roboto-regular.woff2", "headers": {"Accept-Encoding": ["gzip, deflate, br"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Accept": ["*/*"], "Sec-Fetch-Dest": ["font"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Mode": ["cors"], "Referer": ["https://tfprometheus.myvnc.com/assets/index.f7b571b2.css"], "Accept-Language": ["en-US,en;q=0.9"], "Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "Origin": ["https://tfprometheus.myvnc.com"], "Sec-Ch-Ua-Mobile": ["?0"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "", "duration": 0.000020509, "size": 0, "status": 401, "resp_headers": {"Server": ["Caddy"], "Www-Authenticate": ["Basic realm=\"restricted\""]}}
2022/07/16 05:35:36.389 error http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/fonts/roboto-medium.woff2", "headers": {"Sec-Ch-Ua-Mobile": ["?0"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Accept": ["*/*"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Dest": ["font"], "Referer": ["https://tfprometheus.myvnc.com/assets/index.f7b571b2.css"], "Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Sec-Fetch-Mode": ["cors"], "Accept-Language": ["en-US,en;q=0.9"], "Accept-Encoding": ["gzip, deflate, br"], "Origin": ["https://tfprometheus.myvnc.com"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "", "duration": 0.00003005, "size": 0, "status": 401, "resp_headers": {"Server": ["Caddy"], "Www-Authenticate": ["Basic realm=\"restricted\""]}}
2022/07/16 05:35:37.397 error http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57192", "proto": "HTTP/1.1", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/websocket", "headers": {"User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Websocket-Key": ["Zd8amMfOilUPZDtwShD/1A=="], "Sec-Websocket-Extensions": ["permessage-deflate; client_max_window_bits"], "Connection": ["Upgrade"], "Pragma": ["no-cache"], "Cache-Control": ["no-cache"], "Upgrade": ["websocket"], "Origin": ["https://tfprometheus.myvnc.com"], "Sec-Websocket-Version": ["13"], "Accept-Language": ["en-US,en;q=0.9"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "http/1.1", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "", "duration": 0.000051229, "size": 0, "status": 401, "resp_headers": {"Server": ["Caddy"], "Www-Authenticate": ["Basic realm=\"restricted\""]}}
2022/07/16 05:35:38.416 error http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57197", "proto": "HTTP/1.1", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/websocket", "headers": {"Cache-Control": ["no-cache"], "Upgrade": ["websocket"], "Origin": ["https://tfprometheus.myvnc.com"], "Sec-Websocket-Version": ["13"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Websocket-Key": ["3aJ4KsVVJoIOaNhs2MIf+Q=="], "Sec-Websocket-Extensions": ["permessage-deflate; client_max_window_bits"], "Connection": ["Upgrade"], "Pragma": ["no-cache"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Accept-Language": ["en-US,en;q=0.9"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "http/1.1", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "", "duration": 0.000045623, "size": 0, "status": 401, "resp_headers": {"Server": ["Caddy"], "Www-Authenticate": ["Basic realm=\"restricted\""]}}
2022/07/16 05:35:39.430 error http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57202", "proto": "HTTP/1.1", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/websocket", "headers": {"Pragma": ["no-cache"], "Cache-Control": ["no-cache"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Accept-Language": ["en-US,en;q=0.9"], "Sec-Websocket-Extensions": ["permessage-deflate; client_max_window_bits"], "Connection": ["Upgrade"], "Sec-Websocket-Version": ["13"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Websocket-Key": ["CFIuXzEt8r8nc/vI8n4z7w=="], "Upgrade": ["websocket"], "Origin": ["https://tfprometheus.myvnc.com"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "http/1.1", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "", "duration": 0.000053205, "size": 0, "status": 401, "resp_headers": {"Server": ["Caddy"], "Www-Authenticate": ["Basic realm=\"restricted\""]}}
2022/07/16 05:35:40.454 error http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57206", "proto": "HTTP/1.1", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/websocket", "headers": {"User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Upgrade": ["websocket"], "Origin": ["https://tfprometheus.myvnc.com"], "Sec-Websocket-Version": ["13"], "Sec-Websocket-Key": ["XNSklXTKJr885JUUblS6jw=="], "Connection": ["Upgrade"], "Pragma": ["no-cache"], "Cache-Control": ["no-cache"], "Accept-Encoding": ["gzip, deflate, br"], "Accept-Language": ["en-US,en;q=0.9"], "Sec-Websocket-Extensions": ["permessage-deflate; client_max_window_bits"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "http/1.1", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "", "duration": 0.000051954, "size": 0, "status": 401, "resp_headers": {"Server": ["Caddy"], "Www-Authenticate": ["Basic realm=\"restricted\""]}}
2022/07/16 05:35:40.972 info http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/fonts/roboto-medium.woff2", "headers": {"Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Mode": ["cors"], "Sec-Fetch-Dest": ["font"], "Accept-Encoding": ["gzip, deflate, br"], "Origin": ["https://tfprometheus.myvnc.com"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Accept": ["*/*"], "Accept-Language": ["en-US,en;q=0.9"], "Authorization": [], "Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "Sec-Ch-Ua-Mobile": ["?0"], "Referer": ["https://tfprometheus.myvnc.com/assets/index.f7b571b2.css"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "username", "duration": 0.004765373, "size": 11056, "status": 200, "resp_headers": {"Last-Modified": ["Thu, 07 Jul 2022 02:27:07 GMT"], "Date": ["Sat, 16 Jul 2022 05:35:57 GMT"], "Content-Length": ["11056"], "Etag": ["\"62c6447b-2b30\""], "Server": ["Caddy", "nginx/1.14.2"], "Accept-Ranges": ["bytes"], "Content-Type": ["application/octet-stream"]}}
2022/07/16 05:35:40.972 info http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/img/sidebar-background.svg", "headers": {"Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "Sec-Ch-Ua-Mobile": ["?0"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Dest": ["image"], "Referer": ["https://tfprometheus.myvnc.com/"], "Accept-Language": ["en-US,en;q=0.9"], "Authorization": [], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Accept": ["image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8"], "Sec-Fetch-Mode": ["no-cors"], "Accept-Encoding": ["gzip, deflate, br"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "username", "duration": 0.00529248, "size": 2669, "status": 200, "resp_headers": {"Last-Modified": ["Thu, 07 Jul 2022 02:27:07 GMT"], "Accept-Ranges": ["bytes"], "Date": ["Sat, 16 Jul 2022 05:35:57 GMT"], "Content-Type": ["image/svg+xml"], "Content-Length": ["2669"], "Etag": ["\"62c6447b-a6d\""], "Server": ["Caddy", "nginx/1.14.2"]}}
2022/07/16 05:35:40.973 info http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/fonts/roboto-regular.woff2", "headers": {"Authorization": [], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Sec-Fetch-Mode": ["cors"], "Accept-Language": ["en-US,en;q=0.9"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Fetch-Dest": ["font"], "Referer": ["https://tfprometheus.myvnc.com/assets/index.f7b571b2.css"], "Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "Origin": ["https://tfprometheus.myvnc.com"], "Sec-Ch-Ua-Mobile": ["?0"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Accept": ["*/*"], "Sec-Fetch-Site": ["same-origin"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "username", "duration": 0.005745834, "size": 11016, "status": 200, "resp_headers": {"Date": ["Sat, 16 Jul 2022 05:35:57 GMT"], "Etag": ["\"62c6447b-2b08\""], "Content-Type": ["application/octet-stream"], "Content-Length": ["11016"], "Accept-Ranges": ["bytes"], "Last-Modified": ["Thu, 07 Jul 2022 02:27:07 GMT"], "Server": ["Caddy", "nginx/1.14.2"]}}
2022/07/16 05:35:40.974 info http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/fonts/roboto-bold.woff2", "headers": {"User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Sec-Fetch-Mode": ["cors"], "Accept-Language": ["en-US,en;q=0.9"], "Origin": ["https://tfprometheus.myvnc.com"], "Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "Sec-Ch-Ua-Mobile": ["?0"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Accept": ["*/*"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Dest": ["font"], "Referer": ["https://tfprometheus.myvnc.com/assets/index.f7b571b2.css"], "Authorization": [], "Accept-Encoding": ["gzip, deflate, br"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "username", "duration": 0.006934824, "size": 11020, "status": 200, "resp_headers": {"Etag": ["\"62c6447b-2b0c\""], "Content-Type": ["application/octet-stream"], "Server": ["Caddy", "nginx/1.14.2"], "Date": ["Sat, 16 Jul 2022 05:35:57 GMT"], "Content-Length": ["11020"], "Last-Modified": ["Thu, 07 Jul 2022 02:27:07 GMT"], "Accept-Ranges": ["bytes"]}}
2022/07/16 05:35:40.984 error http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/sw.js", "headers": {"Referer": ["https://tfprometheus.myvnc.com/"], "If-None-Match": ["W/\"62c6447b-4699\""], "Cache-Control": ["max-age=0"], "Accept": ["*/*"], "Service-Worker": ["script"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Dest": ["serviceworker"], "Sec-Fetch-Mode": ["same-origin"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Accept-Language": ["en-US,en;q=0.9"], "If-Modified-Since": ["Thu, 07 Jul 2022 02:27:07 GMT"], "Accept-Encoding": ["gzip, deflate, br"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "", "duration": 0.000049309, "size": 0, "status": 401, "resp_headers": {"Server": ["Caddy"], "Www-Authenticate": ["Basic realm=\"restricted\""]}}
2022/07/16 05:35:41.009 info http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57099", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/sw.js", "headers": {"Referer": ["https://tfprometheus.myvnc.com/"], "Accept-Language": ["en-US,en;q=0.9"], "If-None-Match": ["W/\"62c6447b-4699\""], "Cache-Control": ["max-age=0"], "Authorization": [], "Accept": ["*/*"], "Service-Worker": ["script"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Mode": ["same-origin"], "Sec-Fetch-Dest": ["serviceworker"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "If-Modified-Since": ["Thu, 07 Jul 2022 02:27:07 GMT"], "Accept-Encoding": ["gzip, deflate, br"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "username", "duration": 0.002527614, "size": 0, "status": 304, "resp_headers": {"Etag": ["\"62c6447b-4699\""], "Date": ["Sat, 16 Jul 2022 05:35:57 GMT"], "Last-Modified": ["Thu, 07 Jul 2022 02:27:07 GMT"], "Server": ["Caddy", "nginx/1.14.2"]}}
2022/07/16 05:35:41.021 error http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57224", "proto": "HTTP/2.0", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/manifest.webmanifest", "headers": {"User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Mode": ["cors"], "Sec-Fetch-Dest": ["manifest"], "Accept-Language": ["en-US,en;q=0.9"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Ch-Ua": ["\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""], "Sec-Ch-Ua-Mobile": ["?0"], "Sec-Ch-Ua-Platform": ["\"Windows\""], "Accept": ["*/*"], "Referer": ["https://tfprometheus.myvnc.com/"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "", "duration": 0.000050693, "size": 0, "status": 401, "resp_headers": {"Server": ["Caddy"], "Www-Authenticate": ["Basic realm=\"restricted\""]}}
2022/07/16 05:35:41.479 error http.log.access.log0 handled request {"request": {"remote_ip": "192.168.1.1", "remote_port": "57227", "proto": "HTTP/1.1", "method": "GET", "host": "tfprometheus.myvnc.com", "uri": "/websocket", "headers": {"Upgrade": ["websocket"], "Sec-Websocket-Version": ["13"], "Accept-Encoding": ["gzip, deflate, br"], "Pragma": ["no-cache"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"], "Sec-Websocket-Key": ["q1CBCul1aDklsQZ1aJNIGg=="], "Connection": ["Upgrade"], "Origin": ["https://tfprometheus.myvnc.com"], "Sec-Websocket-Extensions": ["permessage-deflate; client_max_window_bits"], "Cache-Control": ["no-cache"], "Authorization": [], "Accept-Language": ["en-US,en;q=0.9"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "http/1.1", "server_name": "tfprometheus.myvnc.com"}}, "user_id": "username", "duration": 0.007942981, "size": 75, "status": 401, "resp_headers": {"Server": ["Caddy", "nginx/1.14.2"], "Date": ["Sat, 16 Jul 2022 05:35:58 GMT"], "Content-Type": ["text/html; charset=UTF-8"], "Content-Length": ["75"]}}
5. What I already tried:
I really don’t know enough about what I’m doing to have tried the right things. I’m just stumbling around in the dark.
6. Links to relevant resources:
Here is a link to an example of the Mainsail app: http://my.mainsail.xyz/
And here’s an example of it working when Mainsail is installed on the same machine as Caddy: https://lucaci32u4.xyz/blog/2021/mainsail-gateway.html
What do I need to do for the various calls to succeed with basic authentication enabled? I’m guessing this is something stupidly simple, but I’m not savvy enough to figure it out. Thank you for your help!