LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-20-2008, 01:04 PM   #1
taj
Member
 
Registered: Aug 2004
Posts: 128

Rep: Reputation: 15
Apache2 Password protecting a directory


I have installed Apache2 on my Ubuntu 8.04 system and have it able to access the WAN, I am trying to be able to password protect the site so that I can control who has access? I have read some help files and tutorials but seem lost, anyone have a easy turtortial for a complete
 
Old 06-20-2008, 02:40 PM   #2
dipuasks
Member
 
Registered: Oct 2005
Location: India
Distribution: Redhat 7-9,Fedora Core 3 - 9, RHEL 4 -5, CentOS 4 - 5, Ubuntu 7.10 - 12.10, Mandirva 2008 -2009
Posts: 133

Rep: Reputation: 16
Hope this one helps...

http://www.linuxhomenetworking.com/w...che_Web_Server

Open the page and drag below for the section " How To Protect Web Page Directories With Passwords"

--Dipu
---------------------------------
Windows? Reboot. Linux!! Be root!!

http://www.smartdipu.info
 
Old 06-20-2008, 09:07 PM   #3
taj
Member
 
Registered: Aug 2004
Posts: 128

Original Poster
Rep: Reputation: 15
Thanks I will read it and give it a try.
 
Old 06-21-2008, 09:57 AM   #4
taj
Member
 
Registered: Aug 2004
Posts: 128

Original Poster
Rep: Reputation: 15
Have tried to follow instructions on the page you suggested, but having a problem when I try to create the ".htpasswd" I get an error saying it can't create the file. I am entering in the terminal the following command:

nitewalker@smj2:~$ sudo htpasswd -c /etc/apache2/httpd/conf/.htpasswd xxxxxx
htpasswd: cannot create file /etc/apache2/httpd/conf/.htpasswd
nitewalker@smj2:~$

I have even tried to cd into /etc/apache2 and then run the command leaving off the /etc/apache2 part and get the same error.
 
Old 06-23-2008, 07:24 PM   #5
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 5&6 CentOS 5, 6 & 7
Posts: 573

Rep: Reputation: 61
Does the directory "/etc/apache2/httpd/conf" exist? Does the file already exist? If so, use the command without the -c option (for creation).
 
  


Reply



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 On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Password Protecting Files Hammad101 Linux - Server 2 10-05-2007 11:19 PM
Password protecting a directory possible? Freestone Linux - Newbie 7 06-08-2006 01:54 AM
Password protecting a directory? How? Thrifty Linux - Security 7 07-20-2004 08:25 PM
Protecting Root Password ukndoit Linux - Security 10 10-16-2003 09:32 AM
password protecting directories jayakrishnan Linux - General 2 02-10-2003 05:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration