Caddy v1.04
Ubuntu 18.04 - systemd
My complete Caddyfile or JSON config where “mydomain” is replaced with actual domain name and “my email” replaced with actual email address.
mydomain {
tls my email
timeouts none
proxy / 192.168.1.97:8096 {
websocket
transparent
}
# Optional security headers
header / {
-Server
Strict-Transport-Security "max-age=31536000;"
Referrer-Policy "strict-origin"
X-XSS-Protection "1; mode=block"
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
}
# Optional logging
#log JellyfinProxy.log
}
3. The problem I’m having:
For a little context, I am not in any way involved with networking, proxies, tls and so on. These terms are familiar but I am not sure my understanding is up to snuff. Likewise, if I brought a web designer, network admin or whatever to a turbine rebuild, you too would have difficulty with the terms we use daily in our trade, and your understanding may be not up to snuff. So please be patient
The caddyfile as posted has worked perfectly with no errors and I can reach my jellyfin server remotely. as I had intended. There is a permission issue with “log”, which is why it is commented out.
That said, I cannot figure out how to access my lan sites. My intention was for remote access to Jellyfin, which I was successful at achieving through web searches and trial and error. However, when I attempt to access site on my local lan, stored at /var/www/html/organizer, from another computer on the samelan I get the error “404 Site 192.168.1.97 is not served on this interface”
5. What I already tried:
Numerous examples on numerous forums. Which probably work if I could see the full caddyfile, but generally they are snippets and I have no idea where to place these in my existing caddyfile, or if a separate caddyfile is required to be at /var/www/htm/.
For example;
If I place this snippet in my existing caddyfile
proxy / 192.168.1.97/ {
websocket
transparent
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-For {remote}
header_upstream X-Forwarded-Proto {scheme}
}
Will this do what I want, grant me access over lan to 192.168.1.97/Organizr?
If so, where exactly would I place this in my caddyfile?
I am putting together a new Caddyfile with the hope of acesss my lan, as well as remotely accessing stuff like nzbget using a snippet such as …
proxy /nzbget 127.0.0.1:6789 {
transparent
}
to access nzbget at https://mydomain/nzbget/
Assuming new Caddyfile will look like the following;
mydomain {
tls my@email.com
timeouts none
# Remote access to Jellyfin. ie mydomain
proxy / 192.168.1.97:8096 {
websocket
transparent
}
# Remote access to nzbget. ie mydomain/nzbget/
proxy /nzbget 127.0.0.1:6789 {
transparent
}
# Remote access to sonarr. ie mydomain/sonarr/
proxy /sonarr 127.0.0.1:8082 {
transparent
}
proxy / 192.168.1.97/ {
root /var/www/html/
websocket
transparent
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-For {remote}
header_upstream X-Forwarded-Proto {scheme}
}
# Optional security headers
header / {
-Server
Strict-Transport-Security "max-age=31536000;"
Referrer-Policy "strict-origin"
X-XSS-Protection "1; mode=block"
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
}
# Optional logging
# log JellyfinProxy.log
}
This maybe so simple that I am missing it, or not, which is why I am here and asking for patience.
Thanks very much in advance for any help!"