example.com { tls { dns cloudflare } gzip root /usr/local/www/html/ proxy /transmission http://local IP:9091 { transparent } unifi.example.com { gzip proxy / local IP:8443 { header_upstream -Authorization insecure_skip_verify websocket transparent }
This is why the "simple" syntax caddy shows by default is bad. I don't understand why Caddy accepts this sort of syntax or shows examples for it.-snip-
example.com { tls { dns cloudflare } gzip root /usr/local/www/html/ proxy /transmission http://local IP:9091 { transparent } } unifi.example.com { gzip proxy / localIP:8443 { header_upstream -Authorization insecure_skip_verify websocket transparent } }
Is that an issue with unifi controller/video, or caddy?Thank you @danb35 and @andrewzah
Unifi controller and Unifi Video both work as above. They don't work as domain.com/app
example.com { tls { dns cloudflare } gzip root /usr/local/www/html/ proxy /transmission http://localhost:9091/ { transparent } proxy /unifi http://localhost:8443/ { header_upstream -Authorization insecure_skip_verify websocket transparent } }
I believe it's due to the unifi controller, but I'm not sure why.s that an issue with unifi controller/video, or caddy?
I tried that plus variations but couldn't get it to work.Something like this ought to work:
The script (which has been using Caddy as the webserver for a while now) is the only guide I've done, so it would have been another user's guide. But that shouldn't make a difference. I haven't run Nextcloud behind a reverse proxy before, but this may give you some ideas of things to put in your Caddyfile:I used your nextcloud guide to set it up manually (before you had the script)
danb35 submitted a new resource:
Reverse Proxy using Caddy (with optional automatic TLS) - Install Caddy Server to use as a reverse proxy for web applications in your FreeNAS jails
Read more about this resource...
curl https://getcaddy.com | bash -s personal tls.dns.namecheap
tls { dns namecheap }
service caddy start
, but the service stops immediately with the following message in the caddy.log file:TERM=xterm-256color NAMECHEAP_API_KEY=************************** NAMECHEAP_API_USER=******************* BLOCKSIZE=K
service caddy start
" command that caddy is being run as a user other than root.Yes, in the rc.conf file. I cover this in the resource, though the example is for Cloudflare:Is there another place that I can configure the environment variables needed by the TLS DNS Plugin?
For your credentials, it'd beFinally, set the API credentials for your DNS provider: sysrc caddy_env="CLOUDFLARE_EMAIL=(cloudflare_account_email) CLOUDFLARE_API_KEY=(global_api_key)".
sysrc caddy_env="NAMECHEAP_API_KEY=************************** NAMECHEAP_API_USER=*******************"
.502 Bad Gateway
. I'm assuming this is because there is caddy and https already setup on the nextcloud jail.village*****.org.nz { gzip proxy / 10.1.1.56/ { transparent } } www.village*****.org.nz { gzip proxy / 10.1.1.56/ { transparent } } cloud.******.net:443 { gzip proxy / https://10.1.1.55/ { transparent } }