2008/8/30 <[EMAIL PROTECTED]> > On 8/29/08, Zach Uram <[EMAIL PROTECTED]> wrote: > > I run apache2 on Debian. I want to set up subdomain so instead of > > www.example.org/html/foo.html visitors can just visit > http://foo.example.org so > > what specifically must I do in apache conf to do this and what type > > of record should I add in my GoDaddy DNS control panel and what will > > the record look like? > > > > Zach > > Short post, many concepts. > - DNS connects server names to IP Addresses. > - A Web server can handle several server names on one IP Address. > Apache httpd calls these virtual servers. > - A website has content. Basic websites associate a URL with a > content file under a root directory. Multiple websites can access the > same files with different root directories. > > You must: > 1. Add foo.example.org to your DNS. (I do not know GoDaddy's control > panel. Ask GoDaddy.) > 2. Add a virtual server in httpd.conf setting the DocumentRoot to the > correct subdirectory. > <VirtualHost *> > ServerName foo.example.org > DocumentRoot /var/www/html/foo > </VirtualHost> > > HTH, > solprovider > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project. > See <URL:http://httpd.apache.org/userslist.html> for more info. > To unsubscribe, e-mail: [EMAIL PROTECTED] > " from the digest: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
Hi Zach, I have virtual hosts in my conf file too, for sub-domains. As far as DNS set up goes: You need (and probably already have) an A-Record hostname (mine is samwootton.com), then you set-up an Alias C-NAME record, (mine is work.samwootton.com). Thats should be all you need to do. Then in your conf, you just set up a virtual host for your new domain name. Regards, Sam Wootton