Warning: Some posts on this platform may contain adult material intended for mature audiences only. Viewer discretion is advised. By clicking ‘Continue’, you confirm that you are 18 years or older and consent to viewing explicit content.
Pretty much any subdomain will go to the nginx server and it will only do something if youve configured that subdomain in the config - everything else just gets ignored, or you can setup a catchall to handle all the unconfigured stuff
so you will need something like this (might not be exact, been a long time since i had to configure NGINX haha)
server {
server_name ha.mydomain.duckdns.org;
location / {
proxy_pass http://hostnameOrIP1:port1;
}
}
server {
server_name nextcloud.mydomain.duckdns.org;
location / {
proxy_pass http://hostnameOrIP2: port
}
}
an easier way would be to use Nginx Proxy Manager which gives you a nice GUI to add and manage all the sites.
To add to an answer, caddy is better fit for reverse proxy in my opinion. It’s like easier to configure version of nginx. With nginx proxy_pass you also have to configure other headers like x_forwarded_to, and you will also need to do some magic to get websockets working.
And also caddy automatically generates certs using ACME, by default.
Damn this is incredibly convenient, I was just playing around trying to setup a home server the past few days and this was exactly what I’ve been looking for.
[-] thunderbox666 « 1 point 2 months ago
Anything that has a web service, such as nextcloud or home assistant, can be setup on a domain or sub domain
So you would setup the domain (for example let’s say you have myhome. duckdns.org) to point to your server running
nginx reverse proxy, and then configure all your services in there
Some of these services might also need extra configuration but most will also have guides on their site on what you
need to configure to work with a reverse proxy
[-] thunderbox666 « 1 point 2 months ago
Pretty much any subdomain will go to the nginx server and it will only do something if youve configured that subdomain in the config - everything else just gets ignored, or you can setup a catchall to handle all the unconfigured stuff
so you will need something like this (might not be exact, been a long time since i had to configure NGINX haha)
an easier way would be to use Nginx Proxy Manager which gives you a nice GUI to add and manage all the sites.
To add to an answer, caddy is better fit for reverse proxy in my opinion. It’s like easier to configure version of nginx. With nginx proxy_pass you also have to configure other headers like x_forwarded_to, and you will also need to do some magic to get websockets working.
And also caddy automatically generates certs using ACME, by default.
Thanks!
sharing actual text makes it searchable and easier to archive for the future
Damn this is incredibly convenient, I was just playing around trying to setup a home server the past few days and this was exactly what I’ve been looking for.
[-] thunderbox666 « 1 point 2 months ago Anything that has a web service, such as nextcloud or home assistant, can be setup on a domain or sub domain
So you would setup the domain (for example let’s say you have myhome. duckdns.org) to point to your server running nginx reverse proxy, and then configure all your services in there
So you might setup homeassistant.myhome.duckdns.org and point it to the internal address you use for home assistant, eg http://192.168.1.15:8123
Then you might add nextcloud as nextcloud.myhome.duckdns.org to point to https://192.168.1.15 These can all be on the same machine as nginx reverse proxy or on another machine all together
Some of these services might also need extra configuration but most will also have guides on their site on what you need to configure to work with a reverse proxy