LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
LinkBack Search this Thread
Old 11-26-2006, 01:07 AM   #1
ghostz00
LQ Newbie
 
Registered: Nov 2006
Posts: 8

Rep: Reputation: 0
Apache2 htaccess problem


I'm trying to setup a website that you need a password to access and want to use .htaccess to restrict access. But It's pretty much ignoring the script. I'm using a default lamp configuration, with default scripts.

My (/var/www/).htaccess script is:

Code:
AuthType Basic
AuthName "My Server"
AuthUserFile /var/.htpasswd
require user john
Thanks,

Last edited by ghostz00; 11-26-2006 at 01:14 AM.
 
Old 11-26-2006, 01:26 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
Are you getting anything in the Apache access/error logs when you access those pages?
 
Old 11-26-2006, 04:01 PM   #3
Tralce
Member
 
Registered: Nov 2006
Location: Maine
Distribution: Debian, Ubuntu, Gentoo
Posts: 109

Rep: Reputation: 15
Try the following:

chmod 777 .htaccess (If you haven't already)

In httpd.conf, made sure AllowOverride is All for /var/www (I think that's what I did)
 
Old 11-26-2006, 11:18 PM   #4
ghostz00
LQ Newbie
 
Registered: Nov 2006
Posts: 8

Original Poster
Rep: Reputation: 0
I added two virtual host entry's into the apache2.conf and that immediately took care of my problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
htaccess problem furqan_sindhu General 0 11-23-2006 06:28 AM
Apache2 .htaccess problem suse 10.0 PB0711 Linux - Networking 2 07-12-2006 11:23 AM
apache2 + htaccess + ssl rubella Linux - Security 1 02-07-2006 05:17 AM
.htaccess problem lothario Linux - Software 0 01-22-2005 05:20 AM
Apache2 .htaccess - Unable To Get Password Prompt. magestic Linux - Software 2 10-27-2004 08:49 AM


All times are GMT -5. The time now is 04:03 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration