You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Linn Kubler <LK...@ecw.org> on 2003/01/29 19:27:38 UTC

[users@httpd] .htaccess setup?

Hi,

I'm running Apache 1.3.20-16 on a RedHat 7.2 server.  Trying to
restrict access to a specific web directory but not having any luck and
I'm hoping someone here can tell me where I've gone astray.

In the httpd.conf file I added a section:
<Directory "/var/www/html/bod">
  AllowOverride AuthConfig
</Directory>

In the bod directory I created a file called .htaccess containing:
AuthType Basic
AuthName "ECW Restricted Area"
AuthUserFile /var/www/passwords
Requre user linn

Then I created the passwords file mentioned above and added my user
name and password.  I then restarted the webserver but it doesn't work. 
When I type in the url I get the index page when I think I should be
getting a login dialog box.

Can anyone shed some more light on this subject, tell where I've gone
wrong or what I'm missing?

Any help would be greatly appreciated.
Thanks in advance,
Linn


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] .htaccess setup?

Posted by Darryl Cook <dl...@cs.appstate.edu>.
Previous post I sent said .htaccess had to be executable...this is a 
wrong statement, sorry.  The XBitHack entry though made a difference 
with me.

Linn Kubler wrote:

>Hi,
>
>I'm running Apache 1.3.20-16 on a RedHat 7.2 server.  Trying to
>restrict access to a specific web directory but not having any luck and
>I'm hoping someone here can tell me where I've gone astray.
>
>In the httpd.conf file I added a section:
><Directory "/var/www/html/bod">
>  AllowOverride AuthConfig
></Directory>
>
>In the bod directory I created a file called .htaccess containing:
>AuthType Basic
>AuthName "ECW Restricted Area"
>AuthUserFile /var/www/passwords
>Requre user linn
>
>Then I created the passwords file mentioned above and added my user
>name and password.  I then restarted the webserver but it doesn't work. 
>When I type in the url I get the index page when I think I should be
>getting a login dialog box.
>
>Can anyone shed some more light on this subject, tell where I've gone
>wrong or what I'm missing?
>
>Any help would be greatly appreciated.
>Thanks in advance,
>Linn
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>  
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] install apache2 in /programs/apache2

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 03:41 AM 1/29/2003, xingguo chen wrote:
>I installed Apache2 by 3 steps.
>
>1. I installed under /programs/apache2.
>2. Edited /programs/apache2/cong/http.conf
>   a. Listen 192.168.0.2:80  ( this is my local IP)
>   b  ServerName linuxfan.dyndns.org:80

Since your listen doesn't include 127.0.0.1 it won't respond to the local
loopback (http://localhost/).  You will have to explicitly hit http://192.168.0.2
or http://linuxfan.dyndns.org if that name resolves correctly to your IP.

>3. go to /programs/apache2/bin, type command # ./apachectl start
>   and i got message 'httpd (pid 8309) already running'

Perhaps you meant to stop then start your server (or... restart.)

Perhaps you have another instance installed by your linux distro
that was already runnung.

>then open a browser,type in url "http://localhost" and
>"http://192.168.0.2"
>
>
>but couldn't connect. anyone can help?
>
>Thanks.
>
>Eric 
>
>
>
>On Wed, 2003-01-29 at 11:09, Joshua Slive wrote:
>> 
>> On Wed, 29 Jan 2003, Darryl Cook wrote:
>> 
>> > Try using the following setting in httpd.conf under the Directory entry
>> > along with AllowOverride.
>> > XBitHack on
>> 
>> Huh?
>> 
>> >
>> > and make sure the .htaccess file is executable.
>> 
>> Huh?
>> 
>> Where are you getting this stuff?  Those are both unnecessary.
>> 
>> To the original poster: instead of using the .htaccess file, simply place
>> the auth directives inside the appropriate <directory> section in
>> httpd.conf.  That eliminates one source of problems.
>> 
>> Joshua.
>> 
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] install apache2 in /programs/apache2

Posted by Gary Turner <kk...@sbcglobal.net>.
xingguo chen wrote:

It is considered bad form to begin a new thread/question by "replying"
to an existing thread.  If you are not answering a previous post, then
send a "new" message.

>I installed Apache2 by 3 steps.
>
>1. I installed under /programs/apache2.

You don't say, but from the non-FHS compliant location, I'm guessing
this is on a legacy OS? (see URLs below)

>2. Edited /programs/apache2/cong/http.conf
>   a. Listen 192.168.0.2:80  ( this is my local IP)

Unless there is a pressing need to listen *only* to a given address,
leave this commented out.  You don't need it.  This may or may not be
the only problem, but is a starting point.

<snip all the stuff that should have already been gone>

For better results when using a mail list, follow the guidelines
presented in these papers:

	http://www.catb.org/~esr/faqs/smart-questions.html
	http://www.netmeister.org/news/learn2quote.html

-- 
gt                                     kk5st@sbcglobal.net
If you find you've dug yourself into a hole, stop digging.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] install apache2 in /programs/apache2

Posted by xingguo chen <xi...@wgemini.homeip.net>.
I installed Apache2 by 3 steps.

1. I installed under /programs/apache2.
2. Edited /programs/apache2/cong/http.conf
   a. Listen 192.168.0.2:80  ( this is my local IP)
   b  ServerName linuxfan.dyndns.org:80
3. go to /programs/apache2/bin, type command # ./apachectl start
   and i got message 'httpd (pid 8309) already running'


then open a browser,type in url "http://localhost" and
"http://192.168.0.2"


but couldn't connect. anyone can help?

Thanks.

Eric 



On Wed, 2003-01-29 at 11:09, Joshua Slive wrote:
> 
> On Wed, 29 Jan 2003, Darryl Cook wrote:
> 
> > Try using the following setting in httpd.conf under the Directory entry
> > along with AllowOverride.
> > XBitHack on
> 
> Huh?
> 
> >
> > and make sure the .htaccess file is executable.
> 
> Huh?
> 
> Where are you getting this stuff?  Those are both unnecessary.
> 
> To the original poster: instead of using the .htaccess file, simply place
> the auth directives inside the appropriate <directory> section in
> httpd.conf.  That eliminates one source of problems.
> 
> Joshua.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] .htaccess setup?

Posted by Darryl Cook <dl...@cs.appstate.edu>.
Sorry, Joshua is right, I am wrong.   My mind is leaving me... :-)

Joshua Slive wrote:

>On Wed, 29 Jan 2003, Darryl Cook wrote:
>
>  
>
>>Try using the following setting in httpd.conf under the Directory entry
>>along with AllowOverride.
>>XBitHack on
>>    
>>
>
>Huh?
>
>  
>
>>and make sure the .htaccess file is executable.
>>    
>>
>
>Huh?
>
>Where are you getting this stuff?  Those are both unnecessary.
>
>To the original poster: instead of using the .htaccess file, simply place
>the auth directives inside the appropriate <directory> section in
>httpd.conf.  That eliminates one source of problems.
>
>Joshua.
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>  
>


Re: [users@httpd] .htaccess setup?

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 29 Jan 2003, Darryl Cook wrote:

> Try using the following setting in httpd.conf under the Directory entry
> along with AllowOverride.
> XBitHack on

Huh?

>
> and make sure the .htaccess file is executable.

Huh?

Where are you getting this stuff?  Those are both unnecessary.

To the original poster: instead of using the .htaccess file, simply place
the auth directives inside the appropriate <directory> section in
httpd.conf.  That eliminates one source of problems.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] .htaccess setup?

Posted by Darryl Cook <dl...@cs.appstate.edu>.
Try using the following setting in httpd.conf under the Directory entry 
along with AllowOverride.
XBitHack on

and make sure the .htaccess file is executable.

Linn Kubler wrote:

>Hi,
>
>I'm running Apache 1.3.20-16 on a RedHat 7.2 server.  Trying to
>restrict access to a specific web directory but not having any luck and
>I'm hoping someone here can tell me where I've gone astray.
>
>In the httpd.conf file I added a section:
><Directory "/var/www/html/bod">
>  AllowOverride AuthConfig
></Directory>
>
>In the bod directory I created a file called .htaccess containing:
>AuthType Basic
>AuthName "ECW Restricted Area"
>AuthUserFile /var/www/passwords
>Requre user linn
>
>Then I created the passwords file mentioned above and added my user
>name and password.  I then restarted the webserver but it doesn't work. 
>When I type in the url I get the index page when I think I should be
>getting a login dialog box.
>
>Can anyone shed some more light on this subject, tell where I've gone
>wrong or what I'm missing?
>
>Any help would be greatly appreciated.
>Thanks in advance,
>Linn
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>  
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] .htaccess setup?

Posted by Jeff Bert <so...@sgwebspace.com>.
Change

Requre user linn

To

Require valid-user

Jeff

-----Original Message-----
From: Linn Kubler [mailto:LKubler@ecw.org] 
Sent: Wednesday, January 29, 2003 10:28 AM
To: users@httpd.apache.org
Subject: [users@httpd] .htaccess setup?


Hi,

I'm running Apache 1.3.20-16 on a RedHat 7.2 server.  Trying to restrict
access to a specific web directory but not having any luck and I'm hoping
someone here can tell me where I've gone astray.

In the httpd.conf file I added a section:
<Directory "/var/www/html/bod">
  AllowOverride AuthConfig
</Directory>

In the bod directory I created a file called .htaccess containing: AuthType
Basic AuthName "ECW Restricted Area" AuthUserFile /var/www/passwords Requre
user linn

Then I created the passwords file mentioned above and added my user name and
password.  I then restarted the webserver but it doesn't work. 
When I type in the url I get the index page when I think I should be getting
a login dialog box.

Can anyone shed some more light on this subject, tell where I've gone wrong
or what I'm missing?

Any help would be greatly appreciated.
Thanks in advance,
Linn


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info. To
unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org