Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 ordered a VPS today, and am about to upload my website. It uses java, mysql, php etc...

However, I need to password protect the site at first...

I use Ubuntu 9.10 and have installed LAMP just now.

How can I easiest do this?


share|improve this question
up vote 2 down vote accepted

You'll find the Apache documentation for authentication here.

It's the only way to password protect it. If you simply want to restrict access while you set it up then it's probably also the most convenient method of restricting access.

share|improve this answer
could you be more specific... Is this what I am after if I need to develop my site without anybody else having access to it? – Anonymous12345 May 25 '10 at 16:32

I'm a bit paranoid but I'd personally firewall off everything but SSH (running on a non-standard, high port) and use a tunnel to access the site over SSH.

All traffic between me and the server is encrypted and you can only access the webserver over the tunnel.

Tunnelling from a unix machine (with a proper ssh binary):

From Windows with Putty:

share|improve this answer

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.