Re: Setting up a subdomain?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





2008/8/30 <solprovider@xxxxxxxxxx>
On 8/29/08, Zach Uram <netrek@xxxxxxxxx> 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: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


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





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux