this might be a newbie question but...
I'm uploading the prototype version of a project I'm working on to our server.. what is the best way to make sure the public can't get access to the page?
Thanks!
Login to protect prototype
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Login to protect prototype
Most webservers will allow you to password protect a directory. What type of webserver is it?
(#10850)
Re: Login to protect prototype
I am using apache on a linux machine...
Re: Login to protect prototype
#1 Go to the Directory of the Site
#2 Make the .htpasswd file
Run the following
If you can't ssh to your server, you would be able to make this on any server, and then copy the file over.
OR simply do the following in the .htpasswd file.
The Password (After the colon) is the same as the output of the Crypt() command in php.
#3 Create .htaccess File (Same directory)
#2 Make the .htpasswd file
Run the following
Code: Select all
htpasswd -bc .htpasswd username passwordOR simply do the following in the .htpasswd file.
Code: Select all
username:XO5UAT7ceqPvc#3 Create .htaccess File (Same directory)
Code: Select all
AuthType Basic
AuthUserFile /path/to/the/.htpasswd
AuthName "Protected Area"
require valid-userRe: Login to protect prototype
Thanks for the help...!
Guess its time to learn apache!
Guess its time to learn apache!
Re: Login to protect prototype
Also, if you access it with permanent IP you can add the following lines:
and it won't ask you for password when accessing it from Your_IP_Here 
Code: Select all
Order Allow,Deny
Allow from Your_IP_Here
Satisfy Any
There are 10 types of people in this world, those who understand binary and those who don't