Ubuntu This forum is for the discussion of Ubuntu Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-16-2007, 08:24 AM
|
#1
|
Senior Member
Registered: Nov 2003
Location: Western Australia
Distribution: GUI Ubuntu, Server Ubuntu, HamPi, Skywave, DragonOS, many other's
Posts: 1,058
Rep:
|
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
|
|
|
06-16-2007, 01:25 PM
|
#2
|
Member
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729
Rep:
|
You are aware of the fact that subdomains will only work with Apache2 if you have them in your DNS configuration?
|
|
|
06-16-2007, 07:23 PM
|
#3
|
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:
|
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
|
|
|
06-18-2007, 03:26 PM
|
#4
|
Member
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729
Rep:
|
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.
|
|
|
06-18-2007, 03:32 PM
|
#5
|
Member
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729
Rep:
|
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.
|
|
|
06-19-2007, 06:00 AM
|
#6
|
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:
|
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
|
|
|
All times are GMT -5. The time now is 05:30 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|