LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 06-02-2010, 10:54 AM   #1
razzera
Member
 
Registered: Dec 2009
Posts: 105

Rep: Reputation: 15
http auth question


Hello

I have a sysinformation program installed in /home/user/sys. the folder exist and i have the following in my httpd.conf & confoguration file for my domain. Im running apache2 by the way.

HTTPD.conf
<Directory "/home/user/sys/">
AuthUserFile /etc/apache2/.htpasswd
AuthName "Restricted Area"
AuthType Basic
require valid-user
</Directory>

Domain file config file
<Directory /home/user/public_html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>

but it wont ask for a password, why??

also, i have a stats program running on my server, you access it trough http://mydomain.com: port same thing here, how can i make is so it ask for login and password when going there ?

Last edited by razzera; 06-02-2010 at 11:17 AM.
 
Old 06-02-2010, 01:06 PM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,957

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
Hi,

I don't understand what is the Domain file config file.
If you have configured a vhost that uses /home/user/public_html as docroot, then it's not going to work. You have to change it to /home/user/sys/public_html, because apache looks for auth info from the directory used in the URL and upwards. So it will find the auth directives at /home/user/sys and will ask for authentication.
Also "AllowOverride" is not needed as you don't use .htaccess

Regards
 
Old 06-04-2010, 11:19 AM   #3
razzera
Member
 
Registered: Dec 2009
Posts: 105

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
Hi,

I don't understand what is the Domain file config file.
If you have configured a vhost that uses /home/user/public_html as docroot, then it's not going to work. You have to change it to /home/user/sys/public_html, because apache looks for auth info from the directory used in the URL and upwards. So it will find the auth directives at /home/user/sys and will ask for authentication.
Also "AllowOverride" is not needed as you don't use .htaccess

Regards
ah sorry the Domain file config is the file in /etc/apache2/Sites-enabled/mysite. i just explained it extremly badly :P

Also i do use .htaccess files so that's why i have AllowOverride.
 
Old 06-04-2010, 05:37 PM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,957

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
So, does it work, or no?
Since you're using .htaccess you can put the auth directives in a .htaccess in the directory you want to password protect.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache http auth. razzera Linux - Security 6 01-27-2010 07:32 AM
Swaret through http proxy+auth securedigital Slackware 8 09-30-2008 11:30 AM
dovecot auth question Gortex Linux - Server 1 06-16-2008 09:08 PM
SMTP Auth question adm1329 Linux - Server 2 02-13-2008 10:43 PM


All times are GMT -5. The time now is 03:46 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