I am new to Caddy and need help in getting the config right.
(Note, new user are allowed only 4 links so i am removing // in my urls)
i have a free dns sean.site.net and have been running my own tt-rss on this dns and i also have “Home Assistant” app running on port 8123. Both works fine when i had apache2. My idea to move to caddy is becaz of auto https, so i would SSL sean.site.net as a main site on port 80 and use sub folders to proxy other apps like “home assistant” and few more i am planning.
First step i am trying without SSL to make everything work.
Goal is when i hit
http:sean.site.net - will access my tt-rss
http:sean.site.net/hass - will access home assistant on localhost:8123
http:sean.site.net/app2 - will be another future app.
Now the first site tt-rss works fine, the second site /hass starts up but it gets redirected to its login page like this http:sean.site.net/auth/login which should be http:sean.site.net/hass/auth/login
and any subsquent pages missing the /hass subfolder name making it inaccessible.
I edited your comment to put your Caddyfile in code blocks (triple backticks, ```) for readability. Putting URLs in code blocks doesn’t count towards link spam, too.
Your Caddyfile configuration looks good. This is a universal problem, not any mistake on your part. I’ve had plenty of opportunities over time to write about this issue on these forums, actually. Here’s a recent one that explains the problem as another poster encountered it:
Have a read of that post - the rest the thread also has some useful information - and post back if you’ve got any questions.
since i am reading that you could do with sub domains, i preferred to take that route instead of sub folders trying to fiddle with and not working so far. I had a domain with me for sometime i haven’t used and thought will make use of it.
I went to godaddy dns and added appropriate subdomains.
my caddy config is like:
```
http://wbcorners.com {
root /var/www/localhost
gzip
}
http://app2.wbcorners.com {
root /var/www/app2
gzip
tls off
}
http://hass.wbcorners.com {
proxy / localhost:8123 {
websocket
transparent
}
}
```
but all site goes to my default first site wbcorners.com
what am I missing, doesn't caddy know what url coming from?
I figured out, that i was doing wrong in godaddy domain setup, I spoke with them and they simply created a A record with the host name instead.
now all 3 sites are pointing to where i wanted it and caddy handles it well pointing to the right sites.
but i am not done yet, becaz for some reason the tt-rss site (you know tiny tiny rss) is able to show but without style sheet applied and looks wierd, still have to figure out why though.