We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
AWS AutoScaling with VestaCP fleet as web tier
AWS AutoScaling with VestaCP fleet as web tier
Hi there,
I am trying to use VestaCP with AWS AutoScaling, however when my VestaCP fleet scales up, internal IP changes and newly launched instances are having issues with starting nginx and apache.
Here is what I get when I start Apache:
Here is what I get when I start nginx:
I've seen this post http://stackoverflow.com/questions/3191 ... ed-address
and added
net.ipv4.ip_nonlocal_bind = 1 in /etc/sysctl.conf then reloaded with sysctl -p /etc/sysctl.conf
Created a new config file with my internal IP /etc/apache2/conf.d/172.31.13.140.conf
Modified contents of it:
Then added my new internal IP in to
However I still see old public IP under DNS settings, I am not using VestaCP as the name server so that's OK.
How do I go about dynamically changing internal IP addresses?
Now that the site is back up would this be enough effort?
Thanks.
I am trying to use VestaCP with AWS AutoScaling, however when my VestaCP fleet scales up, internal IP changes and newly launched instances are having issues with starting nginx and apache.
Here is what I get when I start Apache:
Code: Select all
root@ip-172-31-13-140:/home/ubuntu# service apache2 start
* Starting web server apache2 AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/conf.d/172.31.3.140.conf:1
(99)Cannot assign requested address: AH00072: make_sock: could not bind to address 172.31.3.140:8080
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
*
* The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
Code: Select all
root@ip-172-31-13-140:/home/ubuntu# service nginx start
nginx: [emerg] bind() to 172.31.3.140:80 failed (99: Cannot assign requested address)
and added
net.ipv4.ip_nonlocal_bind = 1 in /etc/sysctl.conf then reloaded with sysctl -p /etc/sysctl.conf
Created a new config file with my internal IP /etc/apache2/conf.d/172.31.13.140.conf
Modified contents of it:
Code: Select all
NameVirtualHost 172.31.13.140:8080
Listen 172.31.13.140:8080
NameVirtualHost 172.31.13.140:8443
Listen 172.31.13.140:844
Code: Select all
/home/admin/conf/web/apache2.conf
/home/admin/conf/web/nginx.conf
/home/admin/conf/web/sapache2.conf
/home/admin/conf/web/snginx.com
How do I go about dynamically changing internal IP addresses?
Now that the site is back up would this be enough effort?
Thanks.
Re: AWS AutoScaling with VestaCP fleet as web tier
did you solve it?
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: AWS AutoScaling with VestaCP fleet as web tier
Can't you order static Elastic IPs for your dynamic stack ? Would be a lot easier that way.
Or,
may be you "update" your IP every day through Cron using this command
I'm not sure if this will work out of the box, may be you also need to rebuild Web or something ?
Or,
may be you "update" your IP every day through Cron using this command
Code: Select all
/usr/local/vesta/bin/v-update-sys-ip
Re: AWS AutoScaling with VestaCP fleet as web tier
maybe a combination of these commands might help?
v-add-sys-ip
v-change-dns-domain-ip
v-change-sys-ip-name
v-change-sys-ip-nat
v-delete-sys-ip
v-add-sys-ip
v-change-dns-domain-ip
v-change-sys-ip-name
v-change-sys-ip-nat
v-delete-sys-ip