this post was submitted on 26 Nov 2023
4 points (83.3% liked)
Self-Hosted Main
515 readers
1 users here now
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
For Example
- Service: Dropbox - Alternative: Nextcloud
- Service: Google Reader - Alternative: Tiny Tiny RSS
- Service: Blogger - Alternative: WordPress
We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.
Useful Lists
- Awesome-Selfhosted List of Software
- Awesome-Sysadmin List of Software
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Here is an example of a working Caddyfile to start from.
In the first example (jelly.user.com), every query to http://jelly.user.com is automatically translated in https and handled over to http://192.168.1.10:7548.
In the second instance, you do not use https (TLS) and every query to http://well.user.com is directly passed along to the service running under http://192.168.1.13:5960.
Note that certificates are automatically handled and renewed by Caddy, giving your email address.
I also added a log for each subdomain for convenience.
I hope this is helpful.
~:/etc/caddy $ cat Caddyfile { log { output file /home/userCaddy-logs/caddy2.log } email user@user.com }
jelly.user.com { log { output file /home/user/Caddy-logs/jelly.log } encode gzip header Strict-Transport-Security max-age1536000; reverse_proxy http://192.168.1.10:7548 }
http://well.user.com { log { output file /home/user/Caddy-logs/well.log } encode gzip header Strict-Transport-Security max-age1536000; reverse_proxy http://192.168.1.13:5960 }
I meant to say thank you at least a day ago - so thank you very much! You've kindly provided a lot of detail, which I hope I can use for my own site. We'll see how we go... Thanks again.