1. My Caddy version (caddy -version
):
Note: I believe the command in the above line should be ‘caddy version’ without the dash.
bill@Bill2:~$ /usr/local/bin/caddy version
v2.0.0-beta12 h1:LZnXOGDr1SbeJNyln8Xc/hXjWCa/a9qFpCbWt2iwJPw=
bill@Bill2:~$
2. How I run Caddy:
Please provide all of the relevant information and DO NOT REDACT anything except passwords/keys. Thank you!
a. System environment:
OS, relevant versions, systemd? docker? etc.
bill@Bill2:~$ lsb_release -a
LSB Version: core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic
bill@Bill2:~$
bill@Bill2:~$ systemctl --version
systemd 239
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid
bill@Bill2:~$
b. Command:
bill@Bill2:~$ which caddy
/usr/local/bin/caddy
bill@Bill2:~$
bill@Bill2:~$ systemctl start caddy.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'caddy.service'.
Authenticating as: Bill,,, (bill)
Password:
==== AUTHENTICATION COMPLETE ===
bill@Bill2:~$
c. Service/unit/compose file:
bill@Bill2:~$ cat /etc/systemd/system/caddy.service
[Unit]
Description=Caddy for Glucose
[Service]
WorkingDirectory=/usr/local/caddy
ExecStart=/usr/local/bin/caddy run
[Install]
WantedBy=multi-user.target
bill@Bill2:~$
d. My complete Caddyfile:
bill@Bill2:~$ cat /usr/local/caddy/Caddyfile
wtrenker.com
matcher notStatic {
not {
file {
try_files {/home/bill/www}
}
}
}
reverse_proxy match:notStatic localhost:7000
file_server browse {
root </home/bill/www>
}
bill@Bill2:~$
3. The problem I’m having:
When I type wtrenker.com into Chrome, or Edge, the url is automatically ‘flipped over’ to https://wtrenker.com as expected and everything works great. But when I type wtrenker.com into Firefox (Version 71.0), the browser just spins and eventually times out. If I type https://wtrenker.com into Firefox manually, that works. So I must be missing some sort of information to make the automatic redirect work with Firefox. There is some mention in another topic here about needing to send something back to the browser. Something like this:
redir 301 {
if {scheme} is http
/ https://{host}{uri}
}
Just exactly where would I put this? Thanks ever so much.
4. Error messages and/or full log output:
The browser (Firefox) times out with a page that says: “The connection has timed out”
5. What I already tried:
I tried to use the caddy.service file that comes with the Caddy installation. But I think I am stabbing around in the dark.