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 06-07-2006, 10:49 PM   #1
prasadlinuxguy
LQ Newbie
 
Registered: Apr 2006
Posts: 9

Rep: Reputation: 0
problem with multiple domains in apache server


in my dns server i have a domain example.com . i have subdomains under it , like server.example.com , login.example.com etc . the zone file is like this :

IN NS example.com.
server IN A 192.168.1.2
mail IN A 192.168.1.2

when i dig them there appears to be no problem.
in the web server conf file i used two different document roots for the subdomains.the sample code is like this :

<VirtualHost server.example.com>
ServerName server.example.com
DocumentRoot /var/www/
</VirtualHost>
<VirtualHost mail.example.com>
ServerName mail.example.com
DocumentRoot /xyz/
</VirtualHost>

if i browse for server.example.com iam getting the desired html file , but if i browse for mail.example.com the http test page is being displayed .Please help me solve the problem.
 
Old 06-07-2006, 11:22 PM   #2
crazee64
LQ Newbie
 
Registered: Mar 2006
Location: Australia
Distribution: FC4 & FC5-Various Kernels & Vector Linux
Posts: 11

Rep: Reputation: 0
This works for me

This is how I do it on my server:
I use Dynamic DNS, but that won't matter if dig works fine.

ServerName 155.143.61.52
NameVirtualHost *:80

<VirtualHost *:80>
ServerName prestigespas.homeip.net
ServerAlias homeip.net *.prestigespas.homeip.net
DocumentRoot /var/www/prestige
</VirtualHost>

<VirtualHost *:80>
ServerName australianile.homeip.net
ServerAlias homeip.net *.australianile.homeip.net
DocumentRoot /var/www/ane
</VirtualHost>
 
  


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: hosting multiple domains fturcic Linux - Software 1 02-15-2005 05:39 PM
Can I use a single Samba server for multiple domains? help321 Linux - Software 0 08-11-2004 05:20 AM
Apache VirtualHost, multiple domains and subdomains chrisfx Linux - Networking 2 08-10-2004 02:58 PM
Securing Multiple Domains on 1 Server jgillin Linux - Security 1 05-10-2004 06:44 AM
multiple pop domains one 1 server dafi Linux - Networking 0 08-11-2001 05:57 AM


All times are GMT -5. The time now is 03:36 PM.

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