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.
[-] 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.