Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-12-2007, 03:37 AM   #1
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

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

Thank you.
Old 11-12-2007, 05:43 AM   #2
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


<virutalhost *:2000>
DocumentRoot "/var/www/html/abc"
Deny from
Old 01-17-2014, 04:20 AM   #3
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


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:04 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration