LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 04-28-2008, 02:46 AM   #1
kopite1
LQ Newbie
 
Registered: Apr 2008
Posts: 11

Rep: Reputation: 0
Setting up a generic subdomain for all domains using Apache2


HI guys,

I have set up apache2 and have got my websites working using virtualhosts.

I want to set up a webmail subdomain on all the domains that goes to the same site.

Is there an easy way to do this or do I need to create serperate entries for each site.
 
Old 04-28-2008, 09:49 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
here you go, the webmail.* wildcard with catch any thing that starts with webmail. and resolves to that server.

Code:
<VirtualHost *:80>
ServerName webmail.example.com
ServerAlias webmail.*
DocumentRoot /path_to_your_webmail
</VirtualHost>
 
Old 04-28-2008, 12:31 PM   #3
jbilla
LQ Newbie
 
Registered: Apr 2008
Posts: 19

Rep: Reputation: 0
Quote:
Originally Posted by datopdog View Post
here you go, the webmail.* wildcard with catch any thing that starts with webmail. and resolves to that server.

Code:
<VirtualHost *:80>
ServerName webmail.example.com
ServerAlias webmail.*
DocumentRoot /path_to_your_webmail
</VirtualHost>
Thanks for sharing..
 
Old 04-28-2008, 12:54 PM   #4
kopite1
LQ Newbie
 
Registered: Apr 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for that

I created a webmail file in site-available with the code above and its now working on each domain I point at the server.

Thanks for your help
 
  


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
How to create apache2 subdomain? gepesz Linux - Networking 3 09-20-2012 05:07 AM
Setting Domains for a Server Jubalint Linux - Networking 5 04-10-2006 06:47 PM
help setting up a pop3 server for virtual domains using qmail kumarsundaram Linux - Software 0 01-23-2006 07:06 PM
How to disable all subdomain on apache2? gepesz Linux - Networking 3 08-01-2004 04:52 PM
Networking questions : Setting up domains/vhosts/subdomains/IPs etc. Belize Linux - Networking 1 09-16-2003 03:39 AM


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