Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Why VestaCP use local IP address instead of external IP address when creating a website?

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
9 posts • Page 1 of 1
baijianpeng
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?
  • Quote

Post by baijianpeng » Sun Jan 15, 2017 11:23 pm

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.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Why VestaCP use local IP address instead of external IP address when creating a website?
  • Quote

Post by mehargags » Mon Jan 16, 2017 7:19 am

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
Top

baijianpeng
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?
  • Quote

Post by baijianpeng » Mon Jan 16, 2017 9:46 am

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.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Why VestaCP use local IP address instead of external IP address when creating a website?
  • Quote

Post by mehargags » Mon Jan 16, 2017 1:32 pm

no you are good with what you did
Top

baijianpeng
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?
  • Quote

Post by baijianpeng » Mon Jan 16, 2017 2:28 pm

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.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Why VestaCP use local IP address instead of external IP address when creating a website?
  • Quote

Post by mehargags » Mon Jan 16, 2017 3:41 pm

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.
Top

baijianpeng
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?
  • Quote

Post by baijianpeng » Mon Jan 16, 2017 11:28 pm

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.
Top

MAN5
Posts: 86
Joined: Sun Jan 31, 2016 4:14 am

Os: Ubuntu 15x
Web: apache + nginx
Re: Why VestaCP use local IP address instead of external IP address when creating a website?
  • Quote

Post by MAN5 » Thu Sep 28, 2017 3:48 am

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.?
Top

MAN5
Posts: 86
Joined: Sun Jan 31, 2016 4:14 am

Os: Ubuntu 15x
Web: apache + nginx
Re: Why VestaCP use local IP address instead of external IP address when creating a website?
  • Quote

Post by MAN5 » Thu Sep 28, 2017 7:57 am

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
Top


Post Reply
  • Print view

9 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password