LinuxQuestions.org
Help answer threads with 0 replies.
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 12-16-2009, 03:31 PM   #1
:.:Numark:.:
LQ Newbie
 
Registered: Jul 2006
Posts: 5

Rep: Reputation: 0
Apache "www" Subdomains


Hello,

I have just setup a subdomain, say called "sub1.domain1.com" which works fine, but it doesn't work if I add a www, i.e. "www.sub1.domain1.com", how would I get it to work with it?

I don't know if these configs are correct or not but here they are:

DNS Config for sub1.domain1.com
Code:
www                     IN      CNAME   sub1.domain1.com
tweetsee                IN      CNAME   domain1.com
tweetsee                IN      A       12.34.56.78
tweetsee                IN      MX      sub1.domain1.com
VHosts Config
Code:
<VirtualHost *:80>
ServerName sub1.domain1.com
ServerAlias sub1.*
ServerAdmin admin@domain1.com
DocumentRoot /var/www/domain1.com/sub1/public_html
</VirtualHost>
Thanks
 
Old 12-16-2009, 04:04 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
not a networking question. moved to Linux - Server

Note that www.sub1.domain.com is *NOT* sub1.domain.com. it has a different name, so you'd need a different server alias. "www" means nothing particular at all to apache, it's just a convention.
 
  


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 subdomains pokevitek Linux - Server 1 12-13-2009 08:37 PM
Apache https redirect without-www to with-www alitrix Linux - Server 3 07-24-2008 06:11 AM
Apache and Subdomains Galaxy_Stranger Linux - Server 4 03-15-2008 02:20 AM
APACHE and Subdomains basketkase999 Linux - Software 18 05-21-2005 10:38 PM
Apache and Subdomains, Help pzorn Linux - General 2 01-27-2004 07:00 PM

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

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