If you’re anything like me, you probably log in and out of a half dozen remote servers on a daily basis. And if you’re even more like me, you have trouble remembering all of the various usernames, remote addresses and command line options for things like specifying a non-standard connection port or forwarding local ports to the remote machine. And sometimes you have to do the same thing in a lot of servers, this post is for you.
To simplify your life, press continue reading :-)
Apache web server allows server access based upon various conditions. For example you just want to restrict access to url http://subdomain.domain.com/ (mapped to /var/www/subdomain directory) from 192.168.1.0/24 network (within intranet).
Apache provides access control based on client hostname, IP address, or other characteristics of the client request using mod_access module.
Press continue reading to understand how to do this!
Sometimes you can get a error like this:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = “pt_BR.UTF-8”,
LC_ADDRESS = “pt_BR.UTF-8”,
LC_MONETARY = “pt_BR.UTF-8”,
LC_NUMERIC = “pt_BR.UTF-8”,
LC_TELEPHONE = “pt_BR.UTF-8”,
LC_IDENTIFICATION = “pt_BR.UTF-8”,
LC_MEASUREMENT = “pt_BR.UTF-8”,
LC_TIME = “pt_BR.UTF-8”,
LC_NAME = “pt_BR.UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
Press continue reading to understand how to fix this!
In this post i will show how to make a installation of Redmine in AWS with some nice tools from AWS (EC2, RDS, S3, SES, ElastiCache) and making it auto scalable.
Amazon Simple Email Service (Amazon SES) is a highly scalable and cost-effective bulk and transactional email-sending service for businesses and developers. Subscription is quick and is on pay-as-you-go basis. You can read more about Amazon SES here.
Why Amazon SES?
If you don’t have your own SMTP server
Or can’t use your ISP mail server due to restrictions on sent emails
Or you can’t afford high montly fees charged by email service providers
What do you get with Amazon SES?
You send bulk emails at an insanely low price, yet with no loss of quality in terms of deliverability. Compared to other ESP (email service providers), Amazon SES is very cheap — just $1 per 10 000 messages.
You ensure a high deliverablity rate — your emails will pass SPF and Sender ID policy checks enforced by many ISPs and DKIM-sign.
You don’t care about feedback loops — Amazon SES will send you an email once someone of your recipients reports your message as spam so you can take the recipient off your list.
To use, you need to select one region where it works, then request production access, to send more than 2000 emails/24h and to send emails to not verified addresses.
You will need to verify the email account that will send emails through ses or the entire domain. If you use Route53 with your domain, amazon will verify your domain and add what it need to be added to your DNS automatically, if not, the service will help you to do that.
You will need an new IAM user to send emails, it will be created you just need to name it and get the secret access key.
The address, port and other settings you can see in SMTP Settings in Amazon SES console.
If you can’t delete Elastic Beanstalk created bucket, first remove all files inside the bucket then remove de bucket policy.
Go to the bucket’s policy (bucket –> properties –> permissions –> edit bucket policy)
Save the change to the Bucket Policy.
Now right click on the bucket and press delete.
Sometimes EC2 CloudWatch monitoring shows 100% CPU usage but when you ssh to your instance and try to see it with ‘top’ you can’t understand what is happening. Probably, Amazon is “borrowing” some of your CPU cycles to give to someone else who needs it – this is standard practice for a virtualised environment where physical server resources like RAM usage and CPU cycles are often hugely over-committed.
To check for CPU steal, run
top and take a look for the
%st value. If this value is anything other than zero, it means your VM’s CPU cycles are being “borrowed”.
More: Understanding CPU Steal Time
In case you lose your Amazon EC2 SSH Key, and can’t login in your instance. This isn’t a big problem if your instance is EBS based and you use an Elastic IP.
1. Upload your new SSH Key, or use one made by AWS
2. Make an AMI of your instance
3. Launch a new machine from your AMI, select the new SSH Key
4. Log in your machine with default user (ubuntu, ec2-user, depends on your original AMI image)
5. Change the Elastic IP to the new machine
6. Turn of the old machine and terminate it.
RDS Class max_connections
First of all, you need to carefully select the region where you are going to stablish your servers.
US-EAST / US-WEST-2 are the cheaper regions by the time that i wrote.
You can check the prices per regions on the links at the end of this post.
Using AWS for almost a year in free tier, i did not paid attention to purchasing options of instances.
Press continue reading for more!