LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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
 
LinkBack Search this Thread
Old 01-17-2007, 06:21 AM   #1
gabsik
Member
 
Registered: Dec 2005
Location: italia
Distribution: Debian etch stable
Posts: 534

Rep: Reputation: 30
Exclamation apache2 NameVirtualHost


On 1 apache2.conf i have 2 virualhosts ,let's say site A and B , these virtualhosts are also in /etc/apache2/sites-enabled with relative configurations for site A and B.If someone fom internet connects to site A would he get site A ? ehehe !I say better ... It' this configuration enough to distinguish people connecting to site A or B ? What about /etc/hosts file ? Thanks !
 
Old 01-17-2007, 06:52 AM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
If you have the Directives NameVirtualHost *:80
The virtual hosts work on the url supplied in the http headers, so long as these match the virtual hosts you have set up in sites-enabled they should go through to the correct site pages.

If the urls don't match for any reason, the first site in your conf will be given, usually 00_default_vhost.conf
 
Old 01-17-2007, 08:32 AM   #3
gabsik
Member
 
Registered: Dec 2005
Location: italia
Distribution: Debian etch stable
Posts: 534

Original Poster
Rep: Reputation: 30
Before apache2 i used to place directive NameVirtualHost *:80 in httpd.conf down the bottom of the file for any site httpd was configured for , each one for every site . Apache2 has directory /etc/apache2/sites-enabled/site_vhost and this file has NameVirtualHost site_vhost:80 on it and doesn't require to place an another NameVirtualHost directive on apache2.conf , right ?
 
Old 01-18-2007, 02:26 PM   #4
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
NameVirtualHost site_vhost:80 would be specific to that domain url, ie site_host

The first one in httpd.conf is with an asterisk, and becomes the default if no other one is specified for a domain file.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache: Allowing IP Access and NameVirtualHost concurrently Swakoo Linux - General 4 08-27-2006 10:46 PM
SuSe Apache2 error: cannot adjust 'apache2' service sir_shunt Suse/Novell 14 04-18-2006 11:36 AM
NameVirtualHost IP# has no VirtualHosts? DigiCrime Linux - Networking 2 10-11-2004 12:24 AM
how to uninstall apache2 which is installed by emerge apache2 flybirdlong Linux - Software 1 07-17-2004 11:46 AM
Another NameVirtualHost problem somroj Linux - Software 1 09-29-2003 04:20 AM


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