Bluehost.com Web Hosting $6.95

.htaccess question protect my php test environment

This is a discussion on .htaccess question protect my php test environment within the PHP General forums, part of the PHP Programming Forums category; I have to apologies about this posting in advance so please don't flame me too bad for being off ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-24-2003
Frank Tudor
 
Posts: n/a
Default .htaccess question protect my php test environment

I have to apologies about this posting in advance so please
don't flame me too bad for being off topic.

Question:

I want to create an .htaccess file to protect my files

I did the passwrd -c /directory/file frank

the set a password and then confirmed the password

I created a .htaccess file with vi and put this in it.

AuthName "restricted stuff"
AuthType Basic
AuthUserFile /var/password/frank

require valid-user

then in the redhat http server utitily under server settings

I went tot he virtual directory section and created a new
virtual dir called virtual 0 and check marked the box at the
bottom for .htaccess protection.

I restart the server and then go to another computer and put in
the URL and no password box comes up.

:(





__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
Reply With Quote
  #2 (permalink)  
Old 10-24-2003
Raditha Dissanayake
 
Posts: n/a
Default Re: [PHP] .htaccess question protect my php test environment

Hi,
It's htpasswd and not passwd. As many others on this group i don't use
the redhat config system it's lame. You will be better off editing
httpd.conf and adding an AllowOverrides directive.

best regards

Frank Tudor wrote:

>I have to apologies about this posting in advance so please
>don't flame me too bad for being off topic.
>
>Question:
>
>I want to create an .htaccess file to protect my files
>
>I did the passwrd -c /directory/file frank
>
>the set a password and then confirmed the password
>
>I created a .htaccess file with vi and put this in it.
>
> AuthName "restricted stuff"
> AuthType Basic
> AuthUserFile /var/password/frank
>
> require valid-user
>
>then in the redhat http server utitily under server settings
>
>I went tot he virtual directory section and created a new
>virtual dir called virtual 0 and check marked the box at the
>bottom for .htaccess protection.
>
>I restart the server and then go to another computer and put in
>the URL and no password box comes up.
>
>:(
>
>
>
>
>
>__________________________________
>Do you Yahoo!?
>The New Yahoo! Shopping - with improved product search
>http://shopping.yahoo.com
>
>
>



--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha/megaupload/
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
Reply With Quote
  #3 (permalink)  
Old 10-24-2003
John Nichel
 
Posts: n/a
Default Re: [PHP] .htaccess question protect my php test environment

Frank Tudor wrote:
> I have to apologies about this posting in advance so please
> don't flame me too bad for being off topic.
>
> Question:
>
> I want to create an .htaccess file to protect my files
>
> I did the passwrd -c /directory/file frank


The above is wrong, the below is right....

htpasswd -c /path/to/file username

>
> the set a password and then confirmed the password
>
> I created a .htaccess file with vi and put this in it.
>
> AuthName "restricted stuff"
> AuthType Basic
> AuthUserFile /var/password/frank
>
> require valid-user
>
> then in the redhat http server utitily under server settings
>
> I went tot he virtual directory section and created a new
> virtual dir called virtual 0 and check marked the box at the
> bottom for .htaccess protection.
>
> I restart the server and then go to another computer and put in
> the URL and no password box comes up.
>
> :(


Make sure you are allowing enough override for .htaccess to work. Can't
help with the GUI...never used one.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
Reply With Quote
  #4 (permalink)  
Old 10-25-2003
James Moe
 
Posts: n/a
Default Re: .htaccess question protect my php test environment

Frank Tudor wrote:
>
> I restart the server and then go to another computer and put in
> the URL and no password box comes up.
>

Add this to the [virtual]host's section:
<directory "/virtual_0/path/whatever">
AllowOverride AuthConfig Options
</directory>

and restart httpd.

--
jimoe at sohnen-moe dot com
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 02:04 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0