LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 07-31-2008, 09:50 PM   #1
td3201
Member
 
Registered: Jan 2002
Location: Omaha, NE US
Distribution: Red Hat/CentOS
Posts: 226

Rep: Reputation: 30
apache -- authentication for all, no auth for one host


Hello,

How can I configure a vhost to authenticate everyone BUT a host or subnet?

Thanks!
 
Old 07-31-2008, 10:02 PM   #2
td3201
Member
 
Registered: Jan 2002
Location: Omaha, NE US
Distribution: Red Hat/CentOS
Posts: 226

Original Poster
Rep: Reputation: 30
Got it:

Require valid-user
Order allow,deny
Allow from 192.168.1
Satisfy Any

This way, either a valid user is accepted or anyone from 192.168.1.0/24.
 
Old 07-31-2008, 10:04 PM   #3
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Rep: Reputation: 31
Thumbs down

You can use the following Apache mod
http://httpd.apache.org/docs/2.2/mod...uthz_host.html
and then just use a Deny From issuance
http://httpd.apache.org/docs/2.2/howto/access.html

--or--

you can just stick the Deny clause in an .htaccess file off that vhosts' root.
 
Old 07-31-2008, 10:17 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
i always liked
Code:
Order deny,allow
Allow from all
Deny from 123.456.789.012
ban an ip
 
  


Reply



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 authentication on SuSE via PAM/system auth files jantman Linux - Server 0 10-02-2006 10:06 PM
Authentication(auto/Net/SMTP/auth.al) in QNX(sendmail uing perl script) kuttylinux Programming 1 09-20-2006 12:58 AM
ssh host authentication bujecas Linux - Security 3 06-22-2006 09:06 AM
apache auth deflin39 Linux - Software 5 01-09-2004 09:17 PM
apache auth with NT antken Linux - Software 0 07-09-2002 07:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:20 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration