Thank you for your answers .. here are some configuration files I will start with /etc/httpd/conf/httpd.conf using
this turtorial
Its pretty big file I can't post it.. so I'll tell you what I added/edited in here ..
LINE 133 - Replaced Listen 80 with Listen 208.84.149.210:80 since this is server main ip
LINE 251 - Replaced ServerAdmin root@localhost with ServerAdmin
hexteam@gmail.com
LINE 266 - Added ServerName 208.84.149.210
LINE 973 - Added NameVirtualHost panel.komentari.info:80
Now I added one virtual hostname record
LINE 985 - <VirtualHost panel.komentari.info:80>
LINE 986 - ServerAdmin
hexteam@gmail.com
LINE 987 - ServerName 208.84.149.210
LINE 988 - DocumentRoot /www
LINE 989 - ErrorLog logs/error_log
LINE 990 - CustomLog logs/access_log combined
LINE 991 - </VirtualHost>
I also added include file so my httpd.conf wouldn't get too big and I can't handle all records inside so I added
LINE 992 - Include conf/vhosts/*.conf and created dir named vhosts
--------------------------------------------------------------------
This is what I get with httpd -S
Code:
httpd -S
[Sun May 25 15:57:22 2008] [error] (EAI 2)Name or service not known: Could not resolve host name panel.komentari.info -- ignoring!
[Sun May 25 15:57:23 2008] [error] (EAI 2)Name or service not known: Could not resolve host name panel.komentari.info -- ignoring!
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:443 208.84.149.210 (/etc/httpd/conf.d/ssl.conf:81)
Syntax OK
And apache is working ok you can check that from your browser 208.84.149.210
What I did next was cd /etc/httpd/conf/vhosts and added 2 files :
1st one was ns1.komentari.info.80.conf with this content
Code:
<VirtualHost ns1.komentari.info:80>
ServerAdmin hexteam@gmail.com
ServerName 208.84.149.210
ServerAlias www.ns1.komentari.info
</VirtualHost>
2nd one named ns2.komentari.info.80.conf with this content changing ServerName with my secondary server ip ..
Code:
<VirtualHost ns2.komentari.info:80>
ServerAdmin hexteam@gmail.com
ServerName 208.84.151.35
ServerAlias www.ns2.komentari.info
</VirtualHost>
Then I restarted Apache service httpd restart got this
Code:
service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [Sun May 25 16:09:50 2008] [error] (EAI 2)Name or service not known: Could not resolve host name panel.komentari.info -- ignoring!
[Sun May 25 16:09:51 2008] [error] (EAI 2)Name or service not known: Could not resolve host name panel.komentari.info -- ignoring!
[Sun May 25 16:09:51 2008] [error] (EAI 2)Name or service not known: Could not resolve host name ns1.komentari.info -- ignoring!
[Sun May 25 16:09:52 2008] [error] (EAI 2)Name or service not known: Could not resolve host name ns2.komentari.info -- ignoring!
[ OK ]
For now what I wanted to do is to create some virtual hosts for my domain komentari.info .. problem is following error from my domain register "541 Invalid attribute value; nameserver "ns1.komentari.info" does not exist" and they won't update the nameservers of this domain.. so I'm again at point zero.. so I moved onto next tutorial I found
this one
is about making cached nameservers .. I'm still a noob on this topic I've been reading a lot and have some expirience with several control panels but never tried to configure this on my own .. so I did next
According to this tutorial there should be file /etc/named.conf but in this version of centos 5 there are slightly different 2 files, one particularly similar to named.conf mentioned in tutorial so what I did I copied named.rfc1912.zones to named.conf and added
Code:
zone "panel.komentari.info" IN {
type master;
file "/var/named/panel.komentari.info.zone";
allow-update { none; };
};
zone "ns1.komentari.info" IN {
type master;
file "/var/named/ns1.komentari.info.zone";
allow-update { none; };
};
zone "ns2.komentari.info" IN {
type master;
file "/var/named/ns1.komentari.info.zone";
allow-update { none; };
};
to make zone for hostname and nameservers ..
then I started named service named start it failed at first because I didn't have files created inside /var/named .. after creating all 3 files started editing
/var/named/panel.komentari.info.zone here is its content
Code:
$TTL 86400
@ IN SOA @ hexteam.gmail.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS ns1.komentari.info.
IN NS ns2.komentari.info.
panel.komentari.info. IN A 208.84.149.210
localhost.panel.komentari.info. IN A 127.0.0.1
Then I created ns1.komentari.info.zone with this content
Code:
$TTL 86400
@ IN SOA @ hexteam.gmail.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS ns1.komentari.info.
IN NS ns2.komentari.info.
ns1.komentari.info. IN A 208.84.149.210
localhost.ns1.komentari.info. IN A 127.0.0.1
And last file ns2.komentari.info.zone has this content
Code:
$TTL 86400
@ IN SOA @ hexteam.gmail.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS ns1.komentari.info.
IN NS ns2.komentari.info.
ns2.komentari.info. IN A 208.84.151.35
localhost.ns2.komentari.info. IN A 127.0.0.1
At this point I noted I forgot to add my main domain name "komentari.info" to these conf. files so I added one record inside named.conf created file inside /var/named with familiar content .. and of course created /etc/httpd/conf/vhosts/komentari.info.80.conf sorry for these backwards steps I've memorized them all and yet I can't figure out the way to get this working .. Now I'm editing file resolv.conf and it looks like this now..
Code:
nameserver 208.77.101.249
nameserver 208.77.101.48
nameserver 208.77.98.215
now I'm not sure whether I should delete these lines or leave them thats why I will just update this file by adding two lines .. Then I went inside vi /etc/sysconfig/network and changed hostname to HOSTNAME="panel.komentari.info" and now tried to start named and it wont start obviously I'm doing something wrong here .. this is ls -la inside /var/named/
Code:
ls -la
total 36
drwxr-x--- 5 root named 4096 May 25 16:41 .
drwxr-xr-x 21 root root 4096 Dec 31 03:46 ..
drwxr-x--- 6 root named 4096 May 25 16:24 chroot
drwxrwx--- 2 named named 4096 Nov 10 2007 data
-rw-r--r-- 1 root root 581 May 25 16:41 komentari.info.zone
lrwxrwxrwx 1 root named 45 May 25 08:03 localdomain.zone -> /var/named/chroot//var/named/localdomain.zone
lrwxrwxrwx 1 root named 43 May 25 08:03 localhost.zone -> /var/named/chroot//var/named/localhost.zone
lrwxrwxrwx 1 root named 44 May 25 08:03 named.broadcast -> /var/named/chroot//var/named/named.broadcast
lrwxrwxrwx 1 root named 37 May 25 08:03 named.ca -> /var/named/chroot//var/named/named.ca
lrwxrwxrwx 1 root named 44 May 25 08:03 named.ip6.local -> /var/named/chroot//var/named/named.ip6.local
lrwxrwxrwx 1 root named 40 May 25 08:03 named.local -> /var/named/chroot//var/named/named.local
lrwxrwxrwx 1 root named 39 May 25 08:03 named.zero -> /var/named/chroot//var/named/named.zero
-rw-r--r-- 1 root root 589 May 25 16:39 ns1.komentari.info.zone
-rw-r--r-- 1 root root 588 May 25 16:41 ns2.komentari.info.zone
-rw-r--r-- 1 root root 594 May 25 16:38 panel.komentari.info.zone
drwxrwx--- 2 named named 4096 Nov 10 2007 slaves
Any suggestions what I did wrong so far ?