LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-02-2012, 10:44 AM   #1
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
Why does Apache require the same thing twice?


I'm just learning about this, in httpd.conf , we have to give it a "NameVirtualHost" which will be the IP of the server, and then AGAIN, in <VirtualHost <whatever ip>:80> .
My question is, why are BOTH of these reqd.?


Thanks.
 
Old 04-02-2012, 12:09 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

It's not the exactly same thing.
With NameVirtualHost you are configuring apache for name-based vhosts.
Using <VirtualHost x.x.x.x:yyyy> afterwards, you can define either name-based, ip-based or port-based vhosts (or all together), depending on the VirtualHost argument.
See this example to understand the difference.

BTW in new apache-2.4 NameVirtualHost is no more used

Regards
 
  


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: Require password for certain IPs? Spetnik Linux - Server 3 02-20-2010 04:56 PM
Apache Auth: Using Require User and Require Group newmanium2001 Linux - Software 1 08-25-2009 02:39 PM
apache active directory require group.. zerocool22 Linux - Server 0 05-06-2008 03:38 AM
Apache require authentication according to client's ip Radicalm16 Linux - Server 2 01-19-2007 08:55 AM
I am kinda almost done with Apache. Just one thing though. PenguinMan Linux - Networking 4 10-23-2002 12:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:18 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