AWS AutoScaling with VestaCP fleet as web tier
Posted: Sun Jan 04, 2015 4:15 am
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.