How to create apache2 subdomain?
Hi there,
I have apache2 http server running on my Debian box. The problem that I'm facing is how to create a subdomain. Here is what I have in /etc/apache2/httpd.conf: <VirtualHost *> ServerName www.abc.com DocumentRoot /var/www </VirtualHost> <VirtualHost *> ServerName webmail.abc.com DocumentRoot /var/www/squirrelmail </VirtualHost> As you can see I'm tring to setup the subdomain 'webmail' under abc.com for SquirrelMail. How can I tell apache2 to goto DocumentRoot /var/www/squirrelmail when somebody types webmail.abc.com into their browser? |
NameVirtualHost *:80
<VirtualHost *:80> ServerName egemen DocumentRoot /var/www/egemen </VirtualHost> <VirtualHost *:80> ServerName mail.egemen ServerAlias mail.* ServerAdmin postmaster@egemen DocumentRoot /var/www/html/webmail/ </VirtualHost> |
Thanks, the NameVirtualHost *:80 did the trick.
I added that on top of the VirtualHosts and started working just fine. |
Hello there.. i just see this post when i'm searching on how to add a subdomain in a webserver..i just want to know the complete step or the first procedure on how to create a subdomain.. thanks..
|
All times are GMT -5. The time now is 11:02 AM. |