Powered by Invision Power Board


  Reply to this topicStart new topicStart Poll

> APACHE HARD RIVE REMOTE ACCESS, putting my c drive on my remote access
rupertdickson
Posted: May 16 2003, 10:46 PM
Quote Post


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
PMEmail Poster
Top
fishsponge
Posted: May 19 2003, 08:32 AM
Quote Post


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:
CODE
AuthUserFile c:\htpasswd.conf
AuthName "Hard Drive"
AuthType Basic

<Limit GET>
require valid-user
</Limit>

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:
CODE
htpasswd.exe c:\htpasswd.conf username

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
PMEmail PosterUsers WebsiteICQAOLYahooMSN
Top
NTLDR
Posted: May 19 2003, 09:41 AM
Quote Post


User Level: 5
*****

Group: Members
Posts: 105
Member No.: 2
Joined: 14-February 03



QUOTE (fishsponge @ May 19 2003, 08:32 AM)
you need to set up "htaccess" files. On *NIX these are typically called ".htaccess" and ".htpasswd", but Windoze doesn't allow these names

Windows XP and Windows 2003 Server do allow .filename or .directoryname now, unlike some previous versions.
PMUsers WebsiteICQAOLYahooMSN
Top
rupertdickson
Posted: May 21 2003, 06:53 PM
Quote Post


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
PMEmail Poster
Top
IGSPara
Posted: Dec 11 2003, 06:31 PM
Quote Post


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

QUOTE
Next, go to that directory, and run the "htpasswd.exe" program that comes with apache, with the following parameters:


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
PMEmail Poster
Top
fishsponge
Posted: Dec 11 2003, 11:36 PM
Quote Post


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:
CODE
C:\>htpasswd.exe -c .htaccess username

NOTE: the '-c' option creates the .htaccess file. If you already have a .htaccess file, don't use the '-c' option.
PMEmail PosterUsers WebsiteICQAOLYahooMSN
Top
IGSPara
Posted: Dec 14 2003, 02:48 PM
Quote Post


Newbie
*

Group: Members
Posts: 3
Member No.: 157
Joined: 11-December 03



ahhhhhh ok now i get it ... ty
PMEmail Poster
Top
NTLDR
Posted: Dec 20 2003, 10:28 PM
Quote Post


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
PMUsers WebsiteICQAOLYahooMSN
Top
rachit
Posted: May 25 2004, 01:46 AM
Quote Post


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/
PMEmail Poster
Top
fishsponge
Posted: May 26 2004, 09:55 AM
Quote Post


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!!
PMEmail PosterUsers WebsiteICQAOLYahooMSN
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | Web Servers & FTP Servers | Next Newest »

Topic Options Reply to this topicStart new topicStart Poll

 



[ Script Execution time: 0.2608 ]   [ 12 queries used ]   [ GZIP Enabled ]




Partners: Cambridge Plus :: <Link Available> :: Prototype Assembly Service :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum