LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 06-16-2007, 08:24 AM   #1
tommytomato
Senior Member
 
Registered: Nov 2003
Location: Western Australia
Distribution: GUI Ubuntu, Server Ubuntu, HamPi, Skywave, DragonOS, many other's
Posts: 1,058

Rep: Reputation: 32
Apache2


Hi all

Does any one have a Apache2 config file sample
of adding in subdomains

I was kind of use to a httpd.conf

I have a heap of subs to add in

sample of what I have

<VirtualHost *:80>
ServerAdmin webmaster@my_domain.com
DocumentRoot /srv/www/subs/community
ServerName community.my_domain.com
DirectoryIndex index.html index.php
</VirtualHost>

TT
 
Old 06-16-2007, 01:25 PM   #2
Moloko
Member
 
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729

Rep: Reputation: 30
You are aware of the fact that subdomains will only work with Apache2 if you have them in your DNS configuration?
 
Old 06-16-2007, 07:23 PM   #3
tommytomato
Senior Member
 
Registered: Nov 2003
Location: Western Australia
Distribution: GUI Ubuntu, Server Ubuntu, HamPi, Skywave, DragonOS, many other's
Posts: 1,058

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Moloko
You are aware of the fact that subdomains will only work with Apache2 if you have them in your DNS configuration?
what do you mean by that

TT
 
Old 06-18-2007, 03:26 PM   #4
Moloko
Member
 
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729

Rep: Reputation: 30
If you enable community.my_domain.com in Apache you need to add 'community' as an A record to your 'my_domain.com' zone file.
 
Old 06-18-2007, 03:32 PM   #5
Moloko
Member
 
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729

Rep: Reputation: 30
If Ubuntu is like Debian you could create a file for each subdomain and link them to the /sites-enabled/ folder with the a2ensite command.
 
Old 06-19-2007, 06:00 AM   #6
tommytomato
Senior Member
 
Registered: Nov 2003
Location: Western Australia
Distribution: GUI Ubuntu, Server Ubuntu, HamPi, Skywave, DragonOS, many other's
Posts: 1,058

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Moloko
If Ubuntu is like Debian you could create a file for each subdomain and link them to the /sites-enabled/ folder with the a2ensite command.
Yes it is Ubuntu ( Lamp Server )

Do you mean a command like so

Code:
$sudo ln -s /etc/apache2/sites-available/example.com.conf example.com.conf
Quote:
If you enable community.my_domain.com in Apache you need to add 'community' as an A record to your 'my_domain.com' zone file.
what do you mean Zone file, /etc/hosts

TT
 
  


Reply


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
Apache2.0.52, t1lib-5.0.2, php-apache2-5.0.2 wizard7423 Slackware 2 04-04-2011 08:09 PM
Apache2 - how to get rid of apache2-default ozymandias Linux - Server 4 09-12-2008 10:27 AM
SuSe Apache2 error: cannot adjust 'apache2' service sir_shunt SUSE / openSUSE 14 04-18-2006 11:36 AM
Apache2 apache2-common WebDav timgerr Linux - Networking 1 08-25-2005 09:41 PM
how to uninstall apache2 which is installed by emerge apache2 flybirdlong Linux - Software 1 07-17-2004 11:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 05:30 AM.

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