RSS
people

My Experiments with AWS – 3 : lamp server, Elastic IP, DNS for ec2

Now that we can connect to the ec2 instance – we want to setup a basic website. I use ubuntu AMI – so, following instructions are for ubuntu. Similar instructions for other platforms can be ported as well.

Installing LAMP Server

# install Apache , PHP and MySql as a package
sudo tasksel install lamp-server
# we may want to enable some of the apache modules
# without rewrite = rewriting URLs will not work
sudo a2enmod rewrite
# headers and expires module will help in performance
sudo a2enmod headers
sudo a2enmod expires

read more »

1 Comment | Tags: , , , , , , ,

My Experiments with AWS – 2 : Connect to EC2 instance

In order to connect with an ec2 instance there are three prime prerequisites:

  • The key file (.pem extension) created while launching an EC2 instance in AWS.
  • Port 22 of the instance is open while launching the instance.
  • Know the public DNS of your EC2 instance.

read more »

1 Comment | Tags: , , , , , , , ,

My Experiments with AWS – 1 : Basics of Amazon Web Services

I have been with dreamhost for 1400 days before I opted to move everything to AWS. I did not had any particular problem with dreamhost. They are good and their support is even better but I wanted to explore AWS, move away from my comfort zone of hosted services, get my hands dirty and learn things in the process. I will be documenting the solutions of the common problems I face and their solutions.

Starting with the basics – AWS pricing structure can be a pain to understand for normal users as they charge for storage, computation, bandwidth etc. They provide a free tier for first year for new customers – which is a plus. For normal usage, one will not even pay anything for first year.

read more »

2 Comments | Tags: , , , , , , ,

Deny directory listing using .htaccess

When you do not have an index.html (or index.php) in your folder, then people can see the listing of all the files by typing the URL of that folder. So, if the server does not deny it by default, an user can see the content of the folder.

We can use htaccess file to prevent it.

Step 1.
Create a file name .htaccess in your folder. (If you already have one, open it and edit)
Step 2.
To ignore all file listing, Write: IndexIgnore *
To ignore special file listings, Write: IndexIgnore *.zip *.gif
(The line above will list all files except the files having zip and gif as extension.

Sometimes, the opposite is required. That means, server denies the directory listing by default but you want to enable it for some reason. This can be achieved using htaccess as well.

Step 1.
Create a file name .htaccess in your folder. (If you already have one, open it and edit)
Step 2.
Write: Options +Indexes

No Comments | Tags: ,