LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Setting up a generic subdomain for all domains using Apache2 (https://www.linuxquestions.org/questions/linux-server-73/setting-up-a-generic-subdomain-for-all-domains-using-apache2-638338/)

kopite1 04-28-2008 02:46 AM

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.

datopdog 04-28-2008 09:49 AM

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>


jbilla 04-28-2008 12:31 PM

Quote:

Originally Posted by datopdog (Post 3135567)
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..

kopite1 04-28-2008 12:54 PM

Thanks for that :D

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


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