LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Set-Up of sub-domain with Apache (https://www.linuxquestions.org/questions/linux-newbie-8/set-up-of-sub-domain-with-apache-461880/)

AndeAnderson 07-07-2006 02:29 PM

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

bathory 07-07-2006 04:39 PM

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.


All times are GMT -5. The time now is 08:22 AM.