Archive for category Linux Support – Servers
Capturing users IP addresses in Apache httpd and Tomcat logs behind an ELB
Posted by Jon Zobrist in Apache, AWS, ELB, Linux Support - Servers on January 6, 2012
When an Elastic Load Balancer handles a connection it sends it’s own (internal/private/10.x) address instead of the clients. It sends the clients along with the request as X-Forwarded-For. To log this you need to log X-Forwarded-For instead of the source IP.
Here are 2 links discussing the problem, the first covers a basic Apache & Tomcat setup, but the second one has a point about direct access getting not logged and has an Apache httpd specific solution.
http://blog.kenweiner.com/2009/09/amazon-elb-capturing-client-ip-address.html
http://blog.grahampoulter.com/2011/10/how-to-log-client-ip-from-apache-behind.html
Thanks @grahampoulter and @kweiner
My EC2 EBS RAID-0 creation script
Posted by Jon Zobrist in AWS, Bash, EBS, EC2, Linux, Linux Support - Servers, Programming on May 4, 2011
I want to write up a full howto/tutorial, but have not had the time.
Here is the script that I referred to in my post at http://jonzobrist.com/2011/04/16/ec2-raid0-on-linux-with-ebs-volumes-notes/
This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License HERE for more details.
http://jonzobrist.com/files/setup-ec2-raid-0.zip
http://jonzobrist.com/files/setup-ec2-raid-0.sh.gz
This script needs an AWS command line setup, and may need some minor tweaking if you’re not running a Ubuntu server.
Ubuntu’s latest AMI’s are available for 10.04 here.
Please feel free to submit patches, comments, or questions.
Thanks to everyone whose helpful posts online and in the AWS forums helped me with this script. I could not have done it with out your generous sharing of work.
Enjoy!
Getting started with Chef.
Posted by Jon Zobrist in AWS, Chef, EC2, Linux, Linux Support - Servers on April 21, 2011
I write a lot of scripts, configure a lot of systems, and do a lot of snapshot related backup/restore/sync stuff on servers in house, and in the cloud.
Chef is a Ruby-based configuration management engine. There is a good intro here.
I set up a Chef Server. There’s a good overview here.
I followed the instructions to setup a Chef server from this Wiki on Opscode.
I also referred to the information from Grig Gheorghiu’s blog here.
Now that my server is up, I’m hoping to port my server configurations to Chef, with heavy reliance on EC2 and hopefully UEC.
LCOD – 7.24.10 – Get su to respect /etc/security/limits.conf
Posted by Jon Zobrist in Linux, Linux Command of the Day, Linux Support - Servers on July 24, 2010
Get su to respect settings in /etc/security/limits.conf
Click to continue reading “LCOD – 7.24.10 – Get su to respect /etc/security/limits.conf”
LCOD – 7.7.10 – Rebuilding and checking a Linux software RAID array
Posted by Jon Zobrist in Linux, Linux Command of the Day, Linux Support - Servers on July 7, 2010
Recovering an unclean ext3 or reiserfs partition when it’s on a software RAID array in Linux – HOWTO.
Click to continue reading “LCOD – 7.7.10 – Rebuilding and checking a Linux software RAID array”
