LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-07-2006, 03:29 PM   #1
AndeAnderson
Member
 
Registered: Feb 2005
Location: Pennsylvania
Distribution: Debian (maybe)
Posts: 237

Rep: Reputation: 30
Question Set-Up of sub-domain with Apache


I tried searching for information on what I need to accomplish to add a sub-domain for our website.

We have Static IPs connected to a ADSL modem with an internal DNS and website hosted on an Apache Server through a SnapLinux firewall.

What do I need to do to add a sub-domain to an existing domain?

We have www.ourdomian.com on the Debian box and would like to add the sub-domain picturealbum.ourdomain.com.

Sorry if this sounds confusing, I am just not sure about the steps I need to take to make this work in Linux.

Thanks
 
Old 07-07-2006, 05:39 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,517

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
If I understand well, you want to use apache to host picturealbum.ourdomain.com along with www.ourdomain.com. First you must add an entry in your zone file for the new host:
Code:
picturealbum A xx.xx.xx.xx or
picturealbum CNAME www
Increase the serial number and restart bind
where xx.xx.xx.xx is the IP of your apache server. Then edit httpd.conf and add something like:
Code:
<VirtualHost *:80>
    DocumentRoot /var/www/picturealbum
    ServerName picturealbum.ourdomain.com
    ServerAdmin   webmaster@eourdomain.com
    CustomLog     /var/log/apache2/example.org-access.log combined
    ErrorLog      /var/log/apache2/example.org-error.log
    </VirtualHost>
Depending of your configuration perhaps you have to use <VirtualHost xx.xx.xx.xx:80> or just <VirtualHost *> and use another entry like the above for the host www.ourdomain.com.
 
  


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
passwd: can't get local yp domain: Local domain name not set powah Linux - Security 4 06-08-2006 10:59 AM
How to set the domain name? Focle_Wulf-190 Slackware 2 09-25-2005 10:01 AM
how do I set the domain name? exodist Linux - Software 6 09-02-2004 02:47 PM
How to set up domain ronald_fancher Linux - Networking 4 12-19-2003 11:41 AM
Want to set up a new domain name and hostname? hamster Linux - Networking 6 04-06-2003 01:04 PM


All times are GMT -5. The time now is 02:33 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration