Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

htaccess / password not working

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  create document root automatically  
Author Message
fluffkin

External


Since: Jul 11, 2006
Posts: 3



(Msg. 1) Posted: Tue Jul 11, 2006 10:31 pm
Post subject: htaccess / password not working
Archived from groups: alt>apache>configuration (more info?)

Hi all,

Hopefully someone out there can help, I seem to be having huge problems
getting password protection working. I'm running Debian unstable with
Apache 2.0.55-4 and just want to password protect the root directory.

I'm not getting anything usefull from the var/log/apache2 files.

I've got a correctly generated .htpasswd file with two users listed.

First I tried adding a .htaccess file to /var/www thus:

AuthUserFile /etc/apache2/.htpasswd
AuthGroupFile /dev/null
AuthName "By Invitation Only"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>

Which needless to say didn't even seem to get noticed...

So I added...

<Directory /var/www/>
AuthType Basic
AuthName "By Invitation Only"
AuthUserFile /etc/apache2/.htpasswd
AllowOverride AuthConfig
Require valid-user
</Directory>

Just before the last </VirtualHost> to my sites-available/default file, and
changed the AllowOverride None to AuthConfig further up the same file.

Still nothing...

So I generated a mybit.conf file in the conf.d directory containing:

<Directory /var/www/>
AuthType Basic
AuthName "By Invitation Only"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
</Directory>

Still nothing...

So I tacked it on the end of the apache2.conf file as well!

STILL NOTHING!

So my sites-available file now looks like...

NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost

DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride AuthConfig
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
# AllowOverride None
AllowOverride AuthConfig
Order deny,allow
# allow from all
deny from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

# My bit
<Directory /var/www/>
AuthType Basic
AuthName "By Invitation Only"
AuthUserFile /etc/apache2/.htpasswd
AllowOverride AuthConfig
Require valid-user
</Directory>

</VirtualHost>

I've kind of run out of options now! Anyone want to tell me where I should
put the darn statements? I'd rather not have a .htaccess file if I can
avoid it, but having neither strategy work is doing my head in!!!

 >> Stay informed about: htaccess / password not working 
Back to top
Login to vote
David

External


Since: Apr 06, 2006
Posts: 40



(Msg. 2) Posted: Tue Jul 11, 2006 10:31 pm
Post subject: Re: htaccess / password not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

fluffkin wrote:
> Hi all,
>
> Hopefully someone out there can help, I seem to be having huge problems
> getting password protection working. I'm running Debian unstable with
> Apache 2.0.55-4 and just want to password protect the root directory.
>
> I'm not getting anything usefull from the var/log/apache2 files.
>
> I've got a correctly generated .htpasswd file with two users listed.
>
> First I tried adding a .htaccess file to /var/www thus:
>
> AuthUserFile /etc/apache2/.htpasswd
> AuthGroupFile /dev/null
> AuthName "By Invitation Only"
> AuthType Basic
> <Limit GET POST>
> require valid-user
> </Limit>
>
> Which needless to say didn't even seem to get noticed...
>
> So I added...
>
> <Directory /var/www/>
> AuthType Basic
> AuthName "By Invitation Only"
> AuthUserFile /etc/apache2/.htpasswd
> AllowOverride AuthConfig
> Require valid-user
> </Directory>
>
> Just before the last </VirtualHost> to my sites-available/default file, and
> changed the AllowOverride None to AuthConfig further up the same file.
>
> Still nothing...
>
> So I generated a mybit.conf file in the conf.d directory containing:
>
> <Directory /var/www/>
> AuthType Basic
> AuthName "By Invitation Only"
> AuthUserFile /etc/apache2/.htpasswd
> Require valid-user
> </Directory>
>
> Still nothing...
>
> So I tacked it on the end of the apache2.conf file as well!
>
> STILL NOTHING!
>
> So my sites-available file now looks like...
>
> NameVirtualHost *
> <VirtualHost *>
> ServerAdmin webmaster@localhost
>
> DocumentRoot /var/www
> <Directory />
> Options FollowSymLinks
> AllowOverride AuthConfig
> </Directory>
> <Directory /var/www/>
> Options Indexes FollowSymLinks MultiViews
> # AllowOverride None
> AllowOverride AuthConfig
> Order deny,allow
> # allow from all
> deny from all
> # Uncomment this directive is you want to see apache2's
> # default start page (in /apache2-default) when you go to /
> #RedirectMatch ^/$ /apache2-default/
> </Directory>
>
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> <Directory "/usr/lib/cgi-bin">
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> </Directory>
>
> ErrorLog /var/log/apache2/error.log
>
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
>
> CustomLog /var/log/apache2/access.log combined
> ServerSignature On
>
> Alias /doc/ "/usr/share/doc/"
> <Directory "/usr/share/doc/">
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order deny,allow
> Deny from all
> Allow from 127.0.0.0/255.0.0.0 ::1/128
> </Directory>
>
> # My bit
> <Directory /var/www/>
> AuthType Basic
> AuthName "By Invitation Only"
> AuthUserFile /etc/apache2/.htpasswd
> AllowOverride AuthConfig
> Require valid-user
> </Directory>
>
> </VirtualHost>
>
> I've kind of run out of options now! Anyone want to tell me where I should
> put the darn statements? I'd rather not have a .htaccess file if I can
> avoid it, but having neither strategy work is doing my head in!!!

Perhaps you overlooked restarting the webserver to read in your changes ?

This is what I have in my httpd.conf file and it works as expected.

<Directory "/path/to/my/ftp_isos">
AllowOverride AuthConfig
AuthType Basic
AuthName "Mandriva FTP Downloads"
AuthUserFile /var/.mandriva_passwd
Require valid-user
</Directory>

 >> Stay informed about: htaccess / password not working 
Back to top
Login to vote
fluffkin

External


Since: Jul 11, 2006
Posts: 3



(Msg. 3) Posted: Wed Jul 12, 2006 8:05 am
Post subject: Re: htaccess / password not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

David wrote:

> fluffkin wrote:
>> Hi all,
>>
>> Hopefully someone out there can help, I seem to be having huge problems
>> getting password protection working. I'm running Debian unstable with
>> Apache 2.0.55-4 and just want to password protect the root directory.
>>
>> I'm not getting anything usefull from the var/log/apache2 files.
>>
>> I've got a correctly generated .htpasswd file with two users listed.
>>
>> First I tried adding a .htaccess file to /var/www thus:
>>
>> AuthUserFile /etc/apache2/.htpasswd
>> AuthGroupFile /dev/null
>> AuthName "By Invitation Only"
>> AuthType Basic
>> <Limit GET POST>
>> require valid-user
>> </Limit>
>>
>> Which needless to say didn't even seem to get noticed...
>>
>> SNIPPED -----------------
>>
>> I've kind of run out of options now! Anyone want to tell me where I
>> should put the darn statements? I'd rather not have a .htaccess file if I
>> can avoid it, but having neither strategy work is doing my head in!!!
>
> Perhaps you overlooked restarting the webserver to read in your changes ?
>
> This is what I have in my httpd.conf file and it works as expected.
>
> <Directory "/path/to/my/ftp_isos">
> AllowOverride AuthConfig
> AuthType Basic
> AuthName "Mandriva FTP Downloads"
> AuthUserFile /var/.mandriva_passwd
> Require valid-user
> </Directory>

I've restarted the thing / force-reload so many times I've lost count!
My httpd.conf is a stub file for backward compatibility. It's empty. The
basic config is in apache2.conf.
 >> Stay informed about: htaccess / password not working 
Back to top
Login to vote
fluffkin

External


Since: Jul 11, 2006
Posts: 3



(Msg. 4) Posted: Wed Jul 12, 2006 8:43 am
Post subject: Re: htaccess / password not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

fluffkin wrote:

> David wrote:
>
>>> SNIPPED -----------------
>>>
>>> I've kind of run out of options now! Anyone want to tell me where I
>>> should put the darn statements? I'd rather not have a .htaccess file if
>>> I can avoid it, but having neither strategy work is doing my head in!!!
>>
>> Perhaps you overlooked restarting the webserver to read in your changes ?
>>
>> This is what I have in my httpd.conf file and it works as expected.
>>
>> <Directory "/path/to/my/ftp_isos">
>> AllowOverride AuthConfig
>> AuthType Basic
>> AuthName "Mandriva FTP Downloads"
>> AuthUserFile /var/.mandriva_passwd
>> Require valid-user
>> </Directory>
>
> I've restarted the thing / force-reload so many times I've lost count!
> My httpd.conf is a stub file for backward compatibility. It's empty. The
> basic config is in apache2.conf.

Veeeery strange.... running /etc/init.d/apache2 stop was killing something,
and if I ran it twice it reported no pid. But, I accidentally tried to
browse the page while apache2 was stopped and... there it was!

ps ax revealed a bunch of apache processes still running! Now that I've run
killall apache and restarted it again, it's actually reading my config file
changes. I can probably figure it out from here...
 >> Stay informed about: htaccess / password not working 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
htaccess password won't work... - Hi, I getting a bit insane of the .htaccess stuff... I just trying out how to set a password to a directory on my windows notebook. Now I've set all files in the root. The request for a password is fine but it won't accept mine... In all the examples...

password protection without htaccess - Hi Im sorta new at using apache and I think I understand htaccess well enough to get it to work in tests... allowing overrides in specific directories only and then adding htaccess files in them. But the documentation says its much preferable, when..

htaccess password promt comes twice - Hi, I configured inserting following in the httpd.conf : <Directory "C:/Programme/Apache 2/htdocs/"> AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec <Limit GET POST OPTIONS PROPFIN...

NEed help with Godaddy password protection (.htaccess) - I have a site hosted by godaddy.com and I once had this working. This enabled me to password protect a directory, but now it does not work. DOes anybody out there know how to do this on godaddy hosting? They (godaddy tech support) say people are doing...

.htaccess password protection does not work - I use .htaccess in my www root already for mod_rewrite. So inprinciple htaccess file work. Now I want to set up password protection. My .htaccess file is: <font color=purple> ;>AuthType Basic</font> <font color=purple>&n...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]