-   Linux - Networking (
-   -   How to create apache2 subdomain? (

gepesz 07-28-2004 06:07 PM

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 *>
DocumentRoot /var/www

<VirtualHost *>
DocumentRoot /var/www/squirrelmail

As you can see I'm tring to setup the subdomain 'webmail' under for SquirrelMail.

How can I tell apache2 to goto DocumentRoot /var/www/squirrelmail when somebody types into their browser?

maxut 07-29-2004 05:22 AM

NameVirtualHost *:80

<VirtualHost *:80>
ServerName egemen
DocumentRoot /var/www/egemen

<VirtualHost *:80>
ServerName mail.egemen
ServerAlias mail.*
ServerAdmin postmaster@egemen
DocumentRoot /var/www/html/webmail/

gepesz 07-29-2004 09:51 AM

Thanks, the NameVirtualHost *:80 did the trick.

I added that on top of the VirtualHosts and started working just fine.

Renz 09-20-2012 05:07 AM

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 03:56 AM.