i’ve added a second ip address (using the ip im using for NS2), ive added a new domain to resolve its dns on the this second ip address (propagated it fully after 48 hours). http and https resolve correctly with a success page.
But when adding letsencrypt it gives me an error, tried many manual hacks (and reverted them) but not getting it to work. what am i missing?;
As I don’t know the actual domain and ip I can’t test it and it’s hard to help you out.
Did you restart nginx?
What happens when you try to reach this page:
http://yourdomain/.well-known/acme-challenge/test
If you add to your public_html directory a file like testing.txt with any text inside and try to reach it (http://YourDomain/testing.txt, what happens?
The OP is using DigitalOcean and the IP they get is not a normal public IP but a reserved IP. The OP assigned this new reserved IP to the server and to the web domains. The problem is that DigitalOcean does not assign reserved IPs directly to the server. Instead, the reserved IP is a NATed IP that forwards all connections on the reserved IP to the internal “anchor IP” assigned to the server.
Because of this, any connection to their domains using the reserved IP was being redirected to the internal anchor IP 10.x.y.z. That anchor IP was configured in Nginx, but no websites were actually using it, so regardless of the request, it always returned the default success page or a 404.
To fix it, we did the following:
1.- Removed the new reserved IP added to Hestia. 2.- Modified /etc/netplan/50-cloud-init.yaml to use the anchor IP’s gateway. 3.- Configured in Hestia the anchor IP to use the reserved IP as its NAT IP. 4.- Reassigned the web domains to use this IP. 5.- Rebuilt the web and mail domains.
o, same case as me. Also thanks to @sahsanu for very promptly help…..appreciate him so much
@aardappeltje FYI, you also need to add something at your Apache templates to correctly log the incoming IP at Apache logs. Also got some help from @sahsanu , you need to add the following inside :
# added for getting IP behind NAT of Digitalocean
RemoteIPHeader X-Real-IP
RemoteIPInternalProxy {YOUR ANCHOR IP HERE (NOT GATEWAY}
@sahsanu ,this is after researching a bit on HestiaCP default remoteip.conf. It’s actually using X-Real-IP but not X-Forwarded-For, so I follow using the same. Correct me if I am doing something wrong. Thanks