How should I configure my ELB health check when using NameVirtualHosts and redirecting to www?
My ELB keeps taking my instances out of service, because the HTTP health check is failing. We have a DNS wildcard, and redirect everything to www: vhost.conf: ServerName www.example.com ServerAlias *.example.com RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC] RewriteRule ^ http://www.example.com/$1 [R=301,L] This works fine for actual browsers, but the HTTP health check to / fails, presumably because it’s getting a 302. Is the best option to use a TCP health check, or is there a [...]
Continue Reading »Which aws zone to choose if website traffic will be from india only
I am going to make my website live on AWS servers and 100% of intended website audience will be from India only. As amazon offers you to get services from various zones, I was wondering is there any substantial difference in performance and page fetch time if I choose my server to be in North Virginia or in Asia Pacific? I have read somewhere that more the server is near a client’s computer, more fast [...]
Continue Reading »Squid showed up on port 8080. Possible Rootkit?
I recently attempted to connect to my EC2 server on 8080 and had some strange issues that weren’t occurring earlier. NGinx (though setup for :81) captures any requests on port 8080. If I stop nginx, I get a “Connection Refused” message from a Squid Proxy I definitely didn’t install myself, and don’t recall seeing before. I’m attempting run a simple Pyramid app on 8080, but the squid proxy seems to be catching all the requests. [...]
Continue Reading »EC2 Ubuntu with WordPress can’t connect to RDS
I have set up a WordPress website on a Ubuntu 12.04 Amazon ec2 machine by following this tutorial except the fact that I haven’t created a MySQL database and I am using an amazon RDS MySQL service. Everything works fine and I am able to create a configuration file during installation but when the installer asks for MySQL credentials. When I fill in the RDS credentials they don’t work. I even tried entering the credentials [...]
Continue Reading »EC2 instance keeps respawning, even after termination
A quite annoying EC2 instance keeps respawning, no matter how many times I try to delete or terminate it. What could be the cause of this? How can I finally get rid of this Micro testing instance? Asked by Forkrul Assail It seems likely that this instance was started within an Auto Scaling Group, possibly as part of an Elastic Beanstalk deployment. If this is the case, either delete the Elastic Beanstalk deployment or set [...]
Continue Reading »How to setup multitenant Route53 subdomains with parent domain not on Route53?
My goal is to be able to add/drop subdomains for a multi-tenant app via Route53: tenant.example.com. Account provisioning should place the new tenant on a hosting node and then add the newly onboarded tenant subdomain to Route53. The parent DNS is currently handled by a 3rd party (dnsmadeeasy). Currently DNS provider has something like this: example.com -> A -> <someIP> example.com -> MX -> <mailhost> mail.example.com -> CNAME -> <mailhost> www.example.com -> CNAME -> example.com [...]
Continue Reading »aws load balancer ssl termination implications
If I set up a load balancer on aws that terminates ssl at the load balancer, then the requests being sent to the application server is in plain text. That has definite security implications. How do folks mitigate this implication in practice? If alternatively, I set up https traffic between load balancer and the application servers also, what are the performance implications? There is bound to be performance hit but how does it compare to [...]
Continue Reading »Using Route 53 with EC2 Public DNS and Virtual Hosts
I would like subdomains of my EC2 Instance Public URL to point to different document trees in on my machine so foo.ec2-012-345-678-901.eu-west-1.compute.amazonaws.com has a separate DocumentRoot to bar.ec2-012-345-678-901.eu-west-1.compute.amazonaws.com My AWS EC2 instance has an elastic IP and a standard Amazon Public URL: http://ec2-012-345-678-901.eu-west-1.compute.amazonaws.com I can visit that URL and I see my Hello World test page. I’ve set up two VirtualHosts. <VirtualHost *:80> DocumentRoot /var/www/foo/public ServerName foo.ec2-012-345-678-901.eu-west-1.compute.amazonaws.com ServerAlias ec2-012-345-678-901.eu-west-1.compute.amazonaws.com </VirtualHost> <VirtualHost *:80> DocumentRoot /var/www/bar/public ServerName [...]
Continue Reading »On AWS do I have to open ports in an EC2 instance’s firewall as well as security group?
If I change my SSH port from 22 to 23453, I can no longer ssh in. In more detail, I’m using a Red Hat EC2 instance on Amazon Web Services. This is the second change I’ve on a fresh install (first change was to add a non-root user). I can ssh in fine using Git Bash and a local .ssh/config file, I edit the line in /etc/ssh/sshd_config that currently says #Port 23453 to say Port [...]
Continue Reading »How to restart mysql server?
Every time I restart MySQL server bitnami@xxx:/$ sudo opt/bitnami/ctlscript.sh start server WWarning: World-writable config file ‘/opt/bitnami/mysql/my.cnf’ is ignored Warning: World-writable config file ‘/opt/bitnami/mysql/my.cnf’ is ignored 121120 12:30:18 mysqld_safe Logging to ‘/opt/bitnami/mysql/data/mysqld.log’. 121120 12:30:18 mysqld_safe Starting mysqld daemon with databases from /opt/bitnami/mysql/data 121120 12:30:20 mysqld_safe mysqld from pid file /opt/bitnami/mysql/data/ip-10-136-14-170.pid ended /opt/bitnami/mysql/scripts/ctl.sh : mysql could not be started The server responds with the following error: (2002, “Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ [...]
Continue Reading »


