# Lets encrypt ssl on second ip address fails

**URL:** <https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741>\
**Category:** System\
**Created:** [December 12, 2025, 5:18pm UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741 "2025-12-12T17:18:59Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![aardappeltje](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/aardappeltje/32/6439_2.png) [@aardappeltje](https://forum.hestiacp.com/u/aardappeltje)\
**Post date:** [December 12, 2025, 5:18pm UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741/1 "2025-12-12T17:18:59Z")

</div>

Hi,

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?;

v-add-letsencrypt-domain main mydomainname.be Error: Let’s Encrypt validation status 400 (mydomainname.be). Details: 403:“201.189.252.165: Invalid response from [http://mydomainname.be/.well-known/acme-challenge/q87fpquI3bu6KMWIZv9EdC-AV\_TH8anrADZbtN8joMQ:](http://mydomainname.be/.well-known/acme-challenge/q87fpquI3bu6KMWIZv9EdC-AV_TH8anrADZbtN8joMQ:) 404”

 ![Screenshot 2025-12-12 181828](https://forum.hestiacp.com/uploads/default/original/2X/0/0d69faa53f264b18de0b752e3c9d74d48adf49c2.png)

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [December 12, 2025, 5:24pm UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741/2 "2025-12-12T17:24:50Z")

</div>

Hi,

> [@aardappeltje](#):
>
> 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.

Did you add that new ip to your server and Hestia? If the answer is yes, is your web domain configured in Hestia to use that ip?

---

<div class="post-metadata">

**Author:** ![aardappeltje](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/aardappeltje/32/6439_2.png) [@aardappeltje](https://forum.hestiacp.com/u/aardappeltje)\
**Post date:** [December 12, 2025, 5:29pm UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741/3 "2025-12-12T17:29:00Z")

</div>

yes correct.

- added in /etc/netplan/01-netcfg.yaml  
under addresses: myip/32
- added ip under network in hestia
- selected the ip under the domainname

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [December 12, 2025, 5:31pm UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741/4 "2025-12-12T17:31:49Z")

</div>

Show the nginx conf for your domain.

```t
cat /etc/nginx/conf.d/domains/YourDomain.conf

```

---

<div class="post-metadata">

**Author:** ![aardappeltje](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/aardappeltje/32/6439_2.png) [@aardappeltje](https://forum.hestiacp.com/u/aardappeltje)\
**Post date:** [December 12, 2025, 5:34pm UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741/5 "2025-12-12T17:34:23Z")

</div>

```auto
#=========================================================================#

# Default Web Domain Template

# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS

# 

https://hestiacp.com/docs/server-administration/web-templates.html

#=========================================================================#

server {
listen 205.189.241.156:80;
server_name mydomain.be www.mydomain.be;
root /home/main/web/mydomain.be/public_html;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/mydomain.be.log combined;
access_log /var/log/nginx/domains/mydomain.be.bytes bytes;
error_log /var/log/nginx/domains/mydomain.be.error.log error;

    include /home/main/conf/web/mydomain.be/nginx.forcessl.conf*;

    location = /favicon.ico {
            log_not_found off;
            access_log off;
    }

    location = /robots.txt {
            try_files $uri $uri/ /index.php?$args;
            log_not_found off;
            access_log off;
    }

    location ~ /\.(?!well-known\/) {
            deny all;
            return 404;
    }

    location / {
            try_files $uri $uri/ /index.php?$args;

            location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|webp|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
                    expires 30d;
                    fastcgi_hide_header "Set-Cookie";
            }

            location ~* /(?:uploads|files)/.*.php$ {
                    deny all;
                    return 404;
            }

            location = /xmlrpc.php {
                            deny all;
                            access_log off;
                            log_not_found off;
                            return 403;
            }

            location ~ [^/]\.php(/|$) {
                    try_files $uri =404;

                    include /etc/nginx/fastcgi_params;

                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

                    fastcgi_pass unix:/run/php/php8.2-fpm-mydomain.be.sock;

                    include /home/main/conf/web/mydomain.be/nginx.fastcgi_cache.conf*;

                    if ($request_uri ~* "/wp-admin/|/wp-json/|wp-.*.php|xmlrpc.php|index.php|/store.*|/cart.*|/my-account.*|/checkout.*") {
                            set $no_cache 1;
                    }

                    if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in|woocommerce_items_in_cart|woocommerce_cart_hash|PHPSESSID") {
                            set $no_cache 1;
                    }
            }
    }

    location /error/ {
            alias /home/main/web/mydomain.be/document_errors/;
    }

    location /vstats/ {
            alias /home/main/web/mydomain.be/stats/;
            include /home/main/web/mydomain.be/stats/auth.conf*;
    }

    include /etc/nginx/conf.d/phpmyadmin.inc*;
    include /etc/nginx/conf.d/phppgadmin.inc*;
    include /home/main/conf/web/mydomain.be/nginx.conf_*;
}

```

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [December 12, 2025, 5:37pm UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741/6 "2025-12-12T17:37:17Z")

</div>

And `205.189.241.156` is the new ip?

---

<div class="post-metadata">

**Author:** ![aardappeltje](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/aardappeltje/32/6439_2.png) [@aardappeltje](https://forum.hestiacp.com/u/aardappeltje)\
**Post date:** [December 12, 2025, 5:37pm UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741/7 "2025-12-12T17:37:40Z")

</div>

yes, i edited it in here but thats the correct new ip.

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [December 12, 2025, 5:42pm UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741/8 "2025-12-12T17:42:32Z")

</div>

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:

```auto
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?

---

<div class="post-metadata">

**Author:** ![aardappeltje](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/aardappeltje/32/6439_2.png) [@aardappeltje](https://forum.hestiacp.com/u/aardappeltje)\
**Post date:** [December 12, 2025, 6:12pm UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741/9 "2025-12-12T18:12:49Z")

</div>

alright ive send you PM, ill post solution here when we get to it.

---

<div class="post-metadata">

**Author:** ![aardappeltje](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/aardappeltje/32/6439_2.png) [@aardappeltje](https://forum.hestiacp.com/u/aardappeltje)\
**Post date:** [December 12, 2025, 6:16pm UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741/10 "2025-12-12T18:16:24Z")

</div>

added testing.txt, still get succes page

> [@sahsanu](#):
>
> testing.txt

# **Success!**

Your new web server is ready to use.

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [December 12, 2025, 11:11pm UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741/11 "2025-12-12T23:11:18Z")

</div>

Just for the record.

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.

More info:

> **[How to Send Outbound Traffic Over a Reserved IP | DigitalOcean Documentation](https://docs.digitalocean.com/products/networking/reserved-ips/how-to/outbound-traffic/)**
>
> Send outbound traffic from your Droplet over a reserved IP address.

---

<div class="post-metadata">

**Author:** ![jasonwch](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/j/d78d45/32.png) [@jasonwch](https://forum.hestiacp.com/u/jasonwch)\
**Post date:** [December 13, 2025, 3:07am UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741/12 "2025-12-13T03:07:23Z")

</div>

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 :

```auto
# 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

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [December 13, 2025, 12:26pm UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741/13 "2025-12-13T12:26:45Z")

</div>

> [@jasonwch](#):
>
> you also need to add something at your Apache

In this case @aardappeltje is not using Apache but thanks for sharing it.

> [@jasonwch](#):
>
> 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.

It’s OK 😉

---

<div class="post-metadata">

**Author:** ![system](https://forum.hestiacp.com/uploads/default/original/1X/d9a5b68bf50ced83e880b56452e592b204761b19.png) [@system](https://forum.hestiacp.com/u/system)\
**Post date:** [January 12, 2026, 12:27pm UTC](https://forum.hestiacp.com/t/lets-encrypt-ssl-on-second-ip-address-fails/20741/14 "2026-01-12T12:27:13Z")

</div>

Closed on January 12, 2026, 12:27pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
