LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-12-2007, 03:37 AM   #1
hocheetiong
Member
 
Registered: Jul 2007
Location: Penang , Malaysia.
Distribution: red hat linux
Posts: 133

Rep: Reputation: 15
Smile how to set apache virtual hosts Host-Based Security?


hi, if not set as apache virtual hosts server, than just direct go to add the ip address or computer name in:

Order deny,allow
Deny from 192.168.30.8

but when now i setup as a virtual hosts apache server than how to configure Host-Based security on virtual hosts, example: i have configure 3 virtual hosts, i want one of them deny from ip 192.168.30.8


Thank you.
 
Old 11-12-2007, 05:43 AM   #2
arub
LQ Newbie
 
Registered: Sep 2007
Location: Coimbatore , India
Distribution: Fedora
Posts: 16
Blog Entries: 2

Rep: Reputation: 0
try this

just specify this inside the virtual host tags


example

<virutalhost *:2000>
DocumentRoot "/var/www/html/abc"
<Directory>
...
...
...
Deny from 192.168.30.8
...
..
</Directory>
</virutalhost>
 
Old 01-17-2014, 04:20 AM   #3
vickey83in
LQ Newbie
 
Registered: Jan 2014
Location: india
Distribution: rhel
Posts: 3

Rep: Reputation: Disabled
Just use correct order

Use this order

Order deny, allow
Allow from [ip of your first virtual host]
Allow from [ip of your second host]
  • If you set Order allow, deny Only those host names or IP addresses associated with allow directive are allowed access. All remaining hosts or IP address would be denied.
  • If you set Order deny, allow Only those host names or IP addresses associated with deny directive are denied access. All remaining hosts or IP address would be allowed.

Source Host based security in Apache
 
  


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
LXer: SSL-enabled Name-based Apache Virtual Hosts with mod_gnutls LXer Syndicated Linux News 0 08-10-2007 05:46 PM
Trying to set up /home/user based virtual hosts in Apache 2 Asymmetry Linux - Server 0 01-04-2007 12:38 PM
Apache2 Name-based Virtual Hosts Problem with .org domain! phoenix09 Linux - Software 18 09-19-2006 04:23 AM
Apache - name based virtual hosts? Moses420ca Linux - Software 7 01-26-2005 11:04 AM
IP based virtual hosts problem adm1329 Linux - Networking 4 03-11-2004 10:40 AM


All times are GMT -5. The time now is 07:30 AM.

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