Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

.htaccess - different behaviours on different remote hosts

Posted on 2003-02-26
2
Medium Priority
?
190 Views
Last Modified: 2012-05-04
Hi,
I am running an Apache web server for testing and developement perposes. The whole wwwroot is protected with .htaccess file in order to be viewd only by developers and some other people. But when I work all day it is very unpleasent to get that box asking for username and password each time I start my browser. My question is how can I configure Apache2(win32) or .htaccess file so that from several hosts not to ask for user and password and for all the other hosts to ask.
I hope you understand what I am asking.
Thanks in advance
0
Comment
Question by:zerofill
2 Comments
 
LVL 2

Accepted Solution

by:
linxit earned 200 total points
ID: 8025452
I think this is the scenario you're after:

<Directory "/wwwroot">
  AuthType Basic
  AuthName "Members Only"
  AuthUserFile /www/passwd/users
  Require valid-user
  Order allow,deny
  Allow from internal.com
  Satisfy any
</Directory>

The 'Satisfy any' directive means that users will be let in if they have a password OR if they are on the internal network.

If you just want to restrict it to a couple of hosts without password, you can replace internal.com with e.g.

Allow from 10.1.2.3 10.1.2.4 10.1.2.5
etc

Andy
0
 
LVL 1

Author Comment

by:zerofill
ID: 8027885
Thanks. It works just fine.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Loops Section Overview
Suggested Courses
Course of the Month10 days, 17 hours left to enroll

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question