LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-07-2008, 09:11 AM   #1
leif_84
LQ Newbie
 
Registered: Jun 2007
Posts: 25

Rep: Reputation: 15
vhost configuration for CNAME wildcard subdomains


Hi!

I have a wild card subdomains set for both of my domain names. Subdomains for the first domain mydomain1.com work without any problems. mydomain2.com domain works without subdomains, but when I add a subdomain, it displays contents from /var/www/htdocs, instead of DocumentRoot /var/www/htdocs/mydomain2. Any ideas why this is happening?


My vhosts configuration:
Quote:
Listen 80
NameVirtualHost mydomain1.com

<VirtualHost mydomain1.com>
ServerName mydomain1.com
DocumentRoot /var/www/htdocs
</VirtualHost>

<VirtualHost mydomain2.com>
ServerName mydomain2.com
DocumentRoot /var/www/htdocs/mydomain2
</VirtualHost>
Thanks!
 
Old 01-08-2008, 02:13 AM   #2
thedonkdonk
Member
 
Registered: Oct 2005
Location: San Jose, CA
Distribution: Fedora, RHEL, CentOS
Posts: 136

Rep: Reputation: 16
Without testing myself I assume its the NameVirtualHost line. It should just be:
Code:
NameVirtualHost *:80
 
  


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
Email configuration -CNAME records - on server File.am Linux - Server 2 10-19-2007 08:18 AM
make wildcard subdomains on localhost work edman007 Linux - Networking 5 09-03-2005 01:41 PM
Apache: Alias is working on ssl vhost but not on mass vhost jonavogt Linux - Software 0 06-07-2005 02:05 PM
Apache vhost issues (client denied by server configuration) bpk Linux - Software 8 02-16-2005 07:02 PM
Subdomais Apache *wildcard CNAME - VirtualDocumentRoot - config file Rai Paul Linux - General 4 06-01-2003 08:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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