LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 07-12-2005, 10:19 AM   #1
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Rep: Reputation: 30
Virtual Host issue with apache


I'm running an apache server at home, and I'm having a problem with virtual hosts. I have two virtual hosts in the config file; fallen-phoenix.com and ash-can.com. When I connect to them internally (using an internal DNS server that resolves to the apache server's internal IP address), they work fine. However, if I try to connect from the outside, it looks in the default directory /apache/htdocs insteady of the directory of the virtual host.

Here is some of my httpd.conf file:

NameVirtualHost www.fallen-phoenix.com
NameVirtualHost www.ash-can.com

<VirtualHost fallen-phoenix.com>
ServerAdmin rana@fallen-phoenix.com
DocumentRoot /apache/fallen-phoenix
ServerName www.fallen-phoenix.com:80
ErrorLog logs/fallen-phoenix.com-error_log
CustomLog logs/fallen-phoenix.com-access_log common
</VirtualHost>
<VirtualHost ash-can.com>
ServerAdmin gauge@ash-can.com
DocumentRoot /apache/ash-can
ServerName www.ash-can.com:80
ErrorLog logs/ash-can.com-error_log
CustomLog logs/ash-can.com-access_log common
</VirtualHost>



What should I do?
 
Old 07-12-2005, 02:00 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Is this still a problem? I get different pages for both hosts.

You shouldn't need to add the port to the ServerName directive.
 
  


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
Apache - Name virtual host tisource Linux - Networking 5 03-03-2006 02:52 AM
Apache Virtual Host problem - DNS or DHCP issue? costrevs Linux - Software 16 03-23-2005 07:50 AM
Virtual Host Redirect Issue DigiDave Linux - Software 1 10-23-2003 01:40 PM
apache virtual host navinc Linux - Software 10 05-22-2003 12:16 PM
apache virtual host mimi Linux - General 1 04-06-2002 05:11 AM


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