volni
volni

Reputation: 5366

How do you make a site private?

I'm just fooling around, learning the ins and outs of web development and I'd like to make my domain private until I'm ready to display it.

What's the best way to do this?

BTW, I have an Apache server on Debian.

Upvotes: 1

Views: 727

Answers (5)

Mikey
Mikey

Reputation: 2951

use an .htaccess file to create a user/pass prompt (be warned that this can be bruteforced but it'll keep the general public out)

here's a good article on how to go about implementing this: http://www.freewebmasterhelp.com/tutorials/htaccess/3

Upvotes: 2

BernzSed
BernzSed

Reputation: 1139

Quick and easy way would be to tell your computer's firewall to block port 80 (the port webservers use).

Also, depending on your webserver, you could configure it to only serve on localhost.

In Apache, for example, I believe you can edit the httpd.conf file and add Listen 127.0.0.1:80.

Upvotes: 1

Greg Hewgill
Greg Hewgill

Reputation: 994141

Other alternatives:

  1. Set up a firewall rule to only allow your IP address(es) access to the site.
  2. Use a subdomain that you don't tell anybody about (this is similar to the password and hidden directory options).

Upvotes: 1

James Black
James Black

Reputation: 41858

You can do one of two things that I can think of:

  1. Put it on a internal network that has no public access.
  2. Require a password to see the the site and don't give it to anyone.

Upvotes: 1

WilliamKF
WilliamKF

Reputation: 43179

Put it in a hidden directory and have the toplevel site be an empty page. Unless someone knows or guesses the directory name, no one will see your actual site.

Upvotes: 0

Related Questions