port 80 on the web server destination serer 192.168.0.43
works in every way: gateway and inside the lan. Perfect.
I have the certbot certs on the gateway 192.168.0.60
generating perfectly
the domain points to the gateway outward facing ip i.e. 192.168.0.60
has an outward facing IP and listens on port 80 and port 443 for the domain madeupexample.com
this is the gateway nginx conf on 192.168.0.60
server{
# SSL configuration
#
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name madeupexample.com www.madeupexample.com;
ssl_certificate /etc/letsencrypt/live/www.madeupexample.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.madeupexample.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
ssl_session_cache shared:SSL:1m;
location / {
proxy_pass http://192.168.0.43;
proxy_set_header Host $host;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
server {
listen 80;
server_name madeupexample.com www.madeupexample.com;
if ($host = madeupexample.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = www.madeupexample.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
return 404; # managed by Certbot
}
this used to work fine
server {
listen 80;
server_name madeupexample.com www.madeupexample.com;
location / {
proxy_pass http://192.168.0.43;
}
}
what am I doing wrong? the domain just spins