Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Nov 2002 15:32:12 -0000
From:      "Kjell" <junkmail@sensewave.com>
To:        <freebsd-questions@freebsd.org>, berninme@muohio.edu
Subject:   Re: domain names, named, and all the problems that go with it.
Message-ID:  <3DCFCD7C.17538.73437B1@localhost>
In-Reply-To: <1229.24.27.164.225.1037022585.squirrel@webmail.muohio.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
> I registered a domain name from godaddy.com. They say you must select two
> name servers to list on so I chose two of their park servers. I used their
> website to add myself to one of the root servers and it worked fine. I now
> want to run my own name server because I want to have several subdomains
> such as 'person.example.com' and 'person2.example.com'. I took myself out
> of the root nameserver with godaddy.com. I read the FreeBSD handbook about
> how to run a nameserver, and here is what I have done.
> 
> my named.conf has this added to it. let's say my domain is example.com and
> my my ip is 65.24.x.x
> 
> options {
>         directory "/etc/namedb";
>         }
> zone "example.com" {
>         type master;
>         file "example.com.db";
>         };
> 
> and this is what I put in example.com.db
> 
> example.com. IN SOA ns1.example.com. admin.example.com. (
>                             2002111005      ; Serial
>                             30M             ; Refresh
>                             3600            ; Retry
>                             604800          ; Expire
>                             86400 )         ; Minimum TTL
> 
>     ; DNS Servers
>     @       IN NS           ns1.example.com.
> 
>     ; Machine Names
>     localhost       IN A    127.0.0.1
>     ns1             IN A    65.24.x.x
>     @               IN A    65.24.x.x
> 
>     ; Aliases
>     person             IN CNAME        @
> 
> I want to run the nameserer and the http server from the same computer.
> 
> Now when I type in http://example.com I get nothing. Does anybody have an
> idea about what I should do. Thanks for the help.
> 
> 
> 
> Mike B
> berninme@muohio.edu

I left a pointer to my IP address in the nameservers at godaddy.
Then I added the following at the end of my httpd.conf file:

####### ===================================== 
####### The first VirtualHost section is used 
##### for requests without a known server name. 
##### ========================================= 
<VirtualHost *>
        ServerAdmin     my-logs@some.com
        DocumentRoot    "/home/www/htdocs"
        ServerName      syvert.la3sg.net
        ErrorLog        /var/log/httpd-error.log
        CustomLog /var/log/httpd-acc.log.syvert 
combined
</VirtualHost>

############ MIDTSETER.COM ###
<VirtualHost *>
        ServerAdmin	my-logs@some.com
        DocumentRoot	"/home/www/htdocs/my.com"
        ServerName	my.com
        ErrorLog	/var/log/httpd-error.log
        CustomLog	/var/log/httpd-acc.log combined
</VirtualHost>

<VirtualHost *>
        ServerAdmin	my-logs@some.com
        DocumentRoot	"/home/www/htdocs/my.com"
        ServerName	www.my.com
        ErrorLog	/var/log/httpd-error.log
        CustomLog	/var/log/httpd-acc.log combined
</VirtualHost>

<VirtualHost *>
        ServerAdmin	my-logs@some.com
        DocumentRoot	"/home/syvert/samba"
        ServerName	programs.my.com
        ErrorLog	/var/log/httpd-error.log
        CustomLog	/var/log/httpd-acc.log combined
</VirtualHost>

<VirtualHost *>
        ServerAdmin	my-logs@some.com
        DocumentRoot	"/music"
        ServerName	music.my.com
        ErrorLog	/var/log/httpd-error.log
        CustomLog	/var/log/httpd-acc.log combined
</VirtualHost>

This way I can add as many "subdomains" as I wish. I also have a nice 
systematic upset for adding webalizer and mrtg statistics.

Good luck from Kjell



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DCFCD7C.17538.73437B1>