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

AWS AutoScaling with VestaCP fleet as web tier

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
RouterRat
Posts: 23
Joined: Sat Dec 06, 2014 12:20 am

AWS AutoScaling with VestaCP fleet as web tier
  • Quote

Post by RouterRat » 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:

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
Here is what I get when I start nginx:

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)
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:

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
Then added my new internal IP in to

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

sayko360
Posts: 1
Joined: Thu Dec 07, 2017 10:43 pm

Re: AWS AutoScaling with VestaCP fleet as web tier
  • Quote

Post by sayko360 » Thu Dec 07, 2017 10:52 pm

did you solve it?
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: AWS AutoScaling with VestaCP fleet as web tier
  • Quote

Post by mehargags » Fri Dec 08, 2017 12:07 pm

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

Code: Select all

/usr/local/vesta/bin/v-update-sys-ip
I'm not sure if this will work out of the box, may be you also need to rebuild Web or something ?
Top

plutocrat
Posts: 232
Joined: Fri Jan 27, 2017 9:16 am

Os: Ubuntu 17x
Web: apache + nginx
Re: AWS AutoScaling with VestaCP fleet as web tier
  • Quote

Post by plutocrat » Mon Dec 18, 2017 5:40 am

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
Top


Post Reply
  • Print view

4 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