Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to run a micro instance on EC2 that will serve as a proxy server for my GAE app. I found this article on how to run it on ami-ad7e2ee8:

but that ami seems to be no longer available. Can someone tell me which free-tier ami to use if I want to easily make a proxy server like that, or if it is impossible this way, what other way can I run a proxy server as a free EC2 instance (a step-by-step tutorial would be welcomed)?

share|improve this question
up vote 3 down vote accepted

The procedure outlined in that article essentially amounts to changing your DNS settings to point your domain at the EC2 instance, and running Nginx (a webserver) on that EC2 instance, with it proxying requests to Google Apps. This general idea can be applied to almost any AMI. I would recommend using the 32-bit version of Amazon's Linux AMI (ami-7f418316) for the purpose (it works in the free tier, and is optimized for good performance. It is based on RHEL/CentOS, so you would would change the following lines:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nginx


sudo yum update
sudo yum install nginx

The remaining instructions remain essentially the same (although, I don't believe the 'sites-available' is created by default, and the main nginx config file is in /etc/nginx/nginx.conf).

As an aside, if you use the AWS console to launch your instances, you will note a yellow star beside instances that are eligible for use in the free tier. Any of them should work fine for this purpose, although, the simplest ones (i.e. ones that have not been pre-loaded with an assortment of unnecessary software) would be the best suited to your purpose.

If you do wish to stick with an Ubuntu AMI, you can find the official list at Ubuntu's EC2 Starters Guide. This lists ami-f333fe9a as the current Ubuntu 10.10 32-bit AMI (which is eligible for the free tier), although, you may prefer to use 32-bit Ubuntu 11.04 instead (ami-e358958a).

share|improve this answer
So in order to run the proxy, I should create "sites-available" directory, then the "default" file, write the contents in, save and run nginx? Since currently I`m having a problem saving the file: ""/etc/nginx/sites-available/default" E212: Can't open file for writing". – ThePiachu Oct 11 '11 at 18:59
a) Check your /etc/nginx.conf file - it may have a line like 'include /etc/nginx/sites-enabled/*.conf;` which will tell you the name of the directory to use. b) You don't actually need to create a directory for one site, you can just add the block to nginx.conf c) If you can't open the file for writing, in most cases, either you don't have permission (sudo) or the directory doesn't exist – cyberx86 Oct 11 '11 at 22:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.