| UNIX/Linux Forum Archives · Rules and Guidelines · Disclaimer |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| rupertdickson |
Posted: May 16 2003, 10:46 PM
|
|
Newbie ![]() Group: Members Posts: 2 Member No.: 38 Joined: 16-May 03 |
hello all,
i have recently set up my apache web server with password protected remote access to a folder in my c drive. Could someone please help me. I need to change the access folder to another folder in my c drive. How would I do this? what and how would i need to program. Thanks all Rue |
| fishsponge |
Posted: May 19 2003, 08:32 AM
|
||||
|
Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 679 Member No.: 1 Joined: 13-February 03 |
right... well first off..... this is rather insecure if you wish to access the entire hard disk! any exploits in apache could allow someone to have full access to whichever directories apache is pointing at, so if you point it at a hard drive, someone who's clever enough could screw ur hard drive.
On another note though... i shall answer your question anyway :D you need to set up "htaccess" files. On *NIX these are typically called ".htaccess" and ".htpasswd", but Windoze doesn't allow these names, so you can call them whatever you like as long as you change the "httpd.conf" file to match the name. I happen to know from pervious correspondence that you are on Windoze, so i'll explain in terms of that. All you do, is create a file called "htaccess.conf" (for example) in the folder you want to protect, and put the following into it:
you then create an empty file called "htpasswd.conf" in the location you specified above (c:\ in this case). Next, go to that directory, and run the "htpasswd.exe" program that comes with apache, with the following parameters:
but replace the username with the username you want to add. it will then prompt for the password twice. This has now protected the directory. You now have to point apache at that directory using an alias. I don't have an httpd.conf file easily at hand at the moment, but if you let me know if you need it, i'll dig it out when i get home :D |
||||
| NTLDR |
Posted: May 19 2003, 09:41 AM
|
||
|
User Level: 5 ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 105 Member No.: 2 Joined: 14-February 03 |
Windows XP and Windows 2003 Server do allow .filename or .directoryname now, unlike some previous versions. |
||
| rupertdickson |
Posted: May 21 2003, 06:53 PM
|
|
Newbie ![]() Group: Members Posts: 2 Member No.: 38 Joined: 16-May 03 |
ok thanks for the help.
I first set it up in a folder called test just to well test it. When i came to delete it and put in the root, it didnt work. I had changed all the required fields like the htaccess files and the other stuff. Now i cant be arsed cos i thought there is not point putting my drive at risk anyway so. lol I have now just moved a few of the folders i want to shar back into the test folder and it works fine. Thanks for the help though, i got it sorted now hopefully, Cheers, Rue |
| IGSPara |
Posted: Dec 11 2003, 06:31 PM
|
||
|
Newbie ![]() Group: Members Posts: 3 Member No.: 157 Joined: 11-December 03 |
Hey guys, I have followed the above instructions but when i get to the
part, a dos box opens and the closes quicker than it opened. I cant seem to get it to run and stay open. Can someone help me out please. Thanks |
||
| fishsponge |
Posted: Dec 11 2003, 11:36 PM
|
||
|
Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 679 Member No.: 1 Joined: 13-February 03 |
you needs to run it with from within a command prompt with parameters... such as:
NOTE: the '-c' option creates the .htaccess file. If you already have a .htaccess file, don't use the '-c' option. |
||
| IGSPara |
Posted: Dec 14 2003, 02:48 PM
|
|
Newbie ![]() Group: Members Posts: 3 Member No.: 157 Joined: 11-December 03 |
ahhhhhh ok now i get it ... ty
|
| NTLDR |
Posted: Dec 20 2003, 10:28 PM
|
|
User Level: 5 ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 105 Member No.: 2 Joined: 14-February 03 |
Alternatively use any of the many available online generators:
http://www.google.com/search?hl=en&lr=&ie=...sword+generator |
| rachit |
Posted: May 25 2004, 01:46 AM
|
|
Newbie ![]() Group: Members Posts: 1 Member No.: 303 Joined: 25-May 04 |
i need serious help. I've been working a lot and cannot find out how to paswd protct my web site directory : _private
my .htaccess file is as follows. Its name is htaccess,htaccess *********************************************************************** AuthUserFile www.angelfire.com/ultra/rachit/_private/htpasswd.htpasswd AuthGroupFile /dev/null AuthName "Private Area" AuthType Basic <Limit GET POST> require user rachit </Limit> Redirect permanent / http://www.yahoo.com ************************************************************************ my .htpasswd file is as follows. Its name is rachit.htpasswd ********************************************************************* rachit:$apr1$E6/.....$UJT00/hmvljJ/t29hLf74/ |
| fishsponge |
Posted: May 26 2004, 09:55 AM
|
|
Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 679 Member No.: 1 Joined: 13-February 03 |
you've given them the wrong filenames.
the .htaccess file must be called simply ".htaccess". You cannot put whatever you like in front of the dot. It must be simply .htaccess. The same goes for .htpasswd. If you don't want to begin the filename with a dot, then look in httpd.conf in your apache installation directory and search it for "htaccess". You can then change the filename apache looks for when it comes to passwording directories. the content looks fine to me, but don't forget to change the first line of your .htaccess file if you rename your .htpasswd file. Hope this helps!! |
![]() |
![]() ![]() ![]() |