There are several different areas that you need to set up.
On RedHat Linux you will need to do the following:
in /etc/named.conf you will need to create a zone entry for your domain.
- zone "example.com" IN { type master; file "example.com"; allow-update { 192.168.0.1; localhost; }; }
Change the IP Address 192... to your server IP and example.com to your domain name.
Then in /var/named you will have to create a Zone file
- $TTL 86400
-
@ IN SOA ns.yourserver.com.
-
sysadmin.yourserver.com. (
-
2007120301 ;
-
3600 ; refresh
-
900 ; retry
-
1209600 ; expire
-
86400 ; default_ttl
-
)
-
example.com. IN MX 10 mail.example.com.
-
mail IN A 192.168.0.1
-
@ IN NS ns.yourserver.com.
-
@ IN NS ns1.yourserver.com.
-
home IN A 192.168.0.1
-
secure IN A 192.168.0.1
-
;virtual domain information
-
ftp IN A 192.168.0.1
-
@ IN A 192.168.0.1
-
www IN A 192.168.0.1
After you have your Zone files then you will need to add an entry into your httpd.conf
On my server it is located at /etc/httpd/conf (it may be somewhere else on your server)
Here is the VirtualHost information
-
<VirtualHost 192.168.0.1:80>
-
ServerAdmin sysadmin@yourserver.com
-
DocumentRoot /domains/example.com
-
ServerName example.com
-
ServerAlias www.example.com
-
ErrorLog /domain/example.com/logs/error_log
-
CustomLog /domains/example.com/logs/access_log combined
-
ErrorDocument 404 /oops/404.html
-
ErrorDocument 500 /oops/500.html
-
</VirtualHost>
After you have all of the info entered then you will have to restart your named and httpd