Why VestaCP use local IP address instead of external IP address when creating a website?
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
Why VestaCP use local IP address instead of external IP address when creating a website?
Today on a fresh installation of VestaCP 0.98-17, when I creating a new website, it uses the local IP address of my VPS server (10.47.92.5) in the configuration files of Apache and Nginx, instead of the external IP address (120.*.*.*).
In fact, on the GUI of VestaCP when creating new website, I saw only the external IP address (120.*.*.*) listed there.
So, whey finally the local IP address was used in those .conf files?
Is this a bug of VestaCP? Please fix it.
Thank you.
In fact, on the GUI of VestaCP when creating new website, I saw only the external IP address (120.*.*.*) listed there.
So, whey finally the local IP address was used in those .conf files?
Is this a bug of VestaCP? Please fix it.
Thank you.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Why VestaCP use local IP address instead of external IP address when creating a website?
it is absolutely fine... just go into your vesta Panel >> IP and give the associate your Public IP to your local IP in the NAT field
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
Re: Why VestaCP use local IP address instead of external IP address when creating a website?
When I enter the GUI of VestaCP -> IP , I saw two records there, one is the local IP, one is the external IP.
Now I had input the external IP into the "Nat Associate" filed for the external IP record.
Do I need to delete the local IP record? Or just leave it there?
Thanks for your help.
Now I had input the external IP into the "Nat Associate" filed for the external IP record.
Do I need to delete the local IP record? Or just leave it there?
Thanks for your help.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Why VestaCP use local IP address instead of external IP address when creating a website?
no you are good with what you did
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
Re: Why VestaCP use local IP address instead of external IP address when creating a website?
No, your trick does not work.
After I input the "NAT IP associate" field with my external IP address and saved, then I added a new domain in VestaCP GUI, but when I check the configuration files, both apache2.conf and nginx.conf still uses the local IP address for this new domain.
After I input the "NAT IP associate" field with my external IP address and saved, then I added a new domain in VestaCP GUI, but when I check the configuration files, both apache2.conf and nginx.conf still uses the local IP address for this new domain.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Why VestaCP use local IP address instead of external IP address when creating a website?
buddy... your configs will use the internal IP only... The External IP is NEVER used by Vesta or configs. It is used by NAT to forward requests to it be sent to you internal IP. It is complicated to understand for a noob but thats how it works.
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
Re: Why VestaCP use local IP address instead of external IP address when creating a website?
Well, now I find out a trick: When adding a new "website", there shows 2 IP addresses in the dropdown list: two SAME IP, the external IP address. The first one, which was selected by default, is actually a NAT mapping of the internal IP. So I need to manually select the second one (though it contains the same numbers as the first one), and then create my website. Now, when I check the conf files, I found external IP addresses inside them.
Re: Why VestaCP use local IP address instead of external IP address when creating a website?
Me too having issues.
1. Created a new droplet with ip '1'
2. setup my vestacp - ubuntu16-apache2+Nginx > everything works well. I deployed few sites, and all works well.
3. assigned a floating ip to my droplet ip'2'
4. I added this ip '2' into my existing vestacp ip's NAT field.
5. now my vestacp shows my servers IP->NAT ip.
6. But on my cloudflare, if i pointing to ip '2', it not working. But still works with ip'1'.
7. the main reason we need floating ip is , if we want to run our sites with backup droplet, but we dont want to change the domain's A records (as it should point to our floating ip always).
8.How to make this work?
Realized only the port 80 connection refused via this ip. But able to login floatingip:vestacp-port. Any advises to open my port for floatingip:80 please.?
1. Created a new droplet with ip '1'
2. setup my vestacp - ubuntu16-apache2+Nginx > everything works well. I deployed few sites, and all works well.
3. assigned a floating ip to my droplet ip'2'
4. I added this ip '2' into my existing vestacp ip's NAT field.
5. now my vestacp shows my servers IP->NAT ip.
6. But on my cloudflare, if i pointing to ip '2', it not working. But still works with ip'1'.
7. the main reason we need floating ip is , if we want to run our sites with backup droplet, but we dont want to change the domain's A records (as it should point to our floating ip always).
8.How to make this work?
Realized only the port 80 connection refused via this ip. But able to login floatingip:vestacp-port. Any advises to open my port for floatingip:80 please.?
Re: Why VestaCP use local IP address instead of external IP address when creating a website?
Realized the issue. Somehow the droplet's original 'AnchorIP (eg 10.0.1.15) is missing from vestacp's IP list on the dashboard. Added the Anchor IP with subnet mask, then tested working fine.
The theme is : the floating IP is always looking for the AnchoIP of the droplet, not the public IP. So, out vestacp server should listen the anchorip too as one of a ip on the webserver
https://vvcares2.blogspot.sg/2017/09/Dr ... staCP.html
The theme is : the floating IP is always looking for the AnchoIP of the droplet, not the public IP. So, out vestacp server should listen the anchorip too as one of a ip on the webserver
https://vvcares2.blogspot.sg/2017/09/Dr ... staCP.html