LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-28-2004, 06:07 PM   #1
gepesz
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 *>
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?
 
Old 07-29-2004, 05:22 AM   #2
maxut
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>

<VirtualHost *:80>
ServerName mail.egemen
ServerAlias mail.*
ServerAdmin postmaster@egemen
DocumentRoot /var/www/html/webmail/
</VirtualHost>
 
Old 07-29-2004, 09:51 AM   #3
gepesz
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
Renz
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..
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:48 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration