Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-28-2004, 06:07 PM   #1
LQ Newbie
Registered: Jun 2004
Location: Washington DC, US
Distribution: Debian, Kubuntu
Posts: 23

Rep: Reputation: 15
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?
Old 07-29-2004, 05:22 AM   #2
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
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/
Old 07-29-2004, 09:51 AM   #3
LQ Newbie
Registered: Jun 2004
Location: Washington DC, US
Distribution: Debian, Kubuntu
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks, the NameVirtualHost *:80 did the trick.

I added that on top of the VirtualHosts and started working just fine.
Old 09-20-2012, 05:07 AM   #4
LQ Newbie
Registered: Sep 2012
Posts: 1

Rep: Reputation: Disabled
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..


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
C compiler cannot create executables [PHP5/Apache2] colabus Linux - Software 4 11-23-2005 03:26 PM
How do I create certificates in Apache2 pjon SUSE / openSUSE 2 05-19-2005 06:54 AM
How to disable all subdomain on apache2? gepesz Linux - Networking 3 08-01-2004 04:52 PM
how to uninstall apache2 which is installed by emerge apache2 flybirdlong Linux - Software 1 07-17-2004 11:46 AM
Subdomain help DoobyWho Linux - General 3 04-14-2003 06:51 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration