Jump to content

problem on DNS Server using Bind...


r_balest
 Share

Recommended Posts

hi, guys... please help...

I'm using Mandriva 2006 and currently on the trial to DNS server using bind

 

here's my configuration:

- /etc/named.conf: zone "e-doc.co" in {

type master;

file "db.e-doc.co";

allow-update {none;};

};

 

zone "9.168.192.in-addr.arpa" in{

type master;

file "rev.e-doc.co";

allow-update {none;};

};

 

- db.e-doc.co: @IN NS NS1.e-doc.co

@IN NS NS2.e-doc.co

e-document in A 192.168.9.14

 

- /etc/resolv.conf: search e-doc.co

nameserver 127.0.0.1

 

I have an application running on 192.168.9.14 [Windows XP], and my DNS server is running on 192.168.9.158 [Linux Mandriva 2006]. If I tried on 9.158 on the firefox and I enter: http://e-document and it worked. BUT, if I try that on 192.168.9.xxx [other IP address but the same segment], it wont show up...

can somebody please point my mistake? Thanks

Link to comment
Share on other sites

Yeah, I think you have some mistakes, look at my example here:

 

$TTL 14400

@	   IN SOA ns1.linuxsolutions.org. admin.linuxsolutions.org. (
	2006032401	 ; serial (yyyymmddxx)
	7200		   ; refresh (in seconds)
	7200		   ; retry (in seconds)
	604800		 ; expire (in seconds)
	86400 )		; minimum (in seconds

linuxsolutions.org.				 IN	  NS	  ns1.linuxsolutions.org
linuxsolutions.org.				 IN	  A	   192.168.0.1

 

the fundamental information is the top. Secondly, you'll see my ns1 entries at the top of the file and the email address finish with a full stop/period at the end ".". You need this, your file is misconfigured.

 

Also, you see at the bottom where I configure the A name record, again, my entry has a "." at the end, with the exception of the ip address and the ns1 record.

 

Make sure your's matches this as closely as possible for the details. The serial with the xx is a number that usually is meant to increment when you make changes to the file. For example, mine is 01, but if I change or add something, I should change it to 02 and so on. This is just for replication between other DNS servers. It's not really too important if you're not replicating to other servers.

Link to comment
Share on other sites

  • 2 weeks later...

ian , i can make it worked now.

but now my boss asked me this:

 

i enter website: //e-document.doc.co/e-document

and it worked

 

can i set the configure so i enter the website like this:

//e-document/e-document

 

so, i still configure .doc.co in /etc/named.conf

but when i enter the site, i don't need to enter .doc.co

 

Thanks

Link to comment
Share on other sites

No, edit your apache config so that the default path points to /var/www/htdocs or whatever the path is and add the extra directory to the end.

 

I can't exactly remember the file name, but it'll be in /etc/apache or /etc/apache2 or /etc/httpd and one of the directories, conf perhaps, and the one for default vhost but not the ssl one.

Link to comment
Share on other sites

Difficult to tell, since I'm doing this on Fedora, and it's different from one version to the next. However:

 

/etc/httpd/conf/httpd.conf

 

and the line in particular is:

 

DocumentRoot "/var/www/html"

 

you need to be changing this to something like:

 

DocumentRoot "/var/www/html/yourdirectoryhere"

 

so that when people open a http page, it will default to where you want. Change "yourdirectoryhere" to whatever your directory is that you want people to default to - which in your example seems to be "e-document".

 

As I said, a lot of this is distro specific. In Gentoo, I have:

 

/etc/apache2

 

as my directory, and I then have to go into something like conf.d directory and find the default_vhost file which holds the config, as it's not always in httpd.conf. So you'll have to check your files and find out what exists, and what doesn't exist, and change accordingly.

Link to comment
Share on other sites

Then if just removing the doc.co then yeah, you can just edit the DNS config and remove it from there.

 

Sorry, I missed that :) I was presuming you just wanted to enter one thing and automatically go to the subdirectory.

Link to comment
Share on other sites

here's my configuration:

- /etc/named.conf: zone "e-doc.co" in {

type master;

file "db.e-doc.co";

allow-update {none;};

};

 

zone "9.168.192.in-addr.arpa" in{

type master;

file "rev.e-doc.co";

allow-update {none;};

};

 

- db.e-doc.co: @IN NS NS1.e-doc.co

@IN NS NS2.e-doc.co

e-document in A 192.168.9.14

 

In this config that you posted originally, this is where you're making your changes.

Link to comment
Share on other sites

so, i remove the configuration into how, ian?

 

- /etc/named.conf: zone "[what's in this]" in {

type master;

file "db.[what's in this]";

allow-update {none;};

};

 

zone "9.168.192.in-addr.arpa" in{

type master;

file "rev.[what's in this]";

allow-update {none;};

};

 

- db.e-doc.co: @IN NS NS1.[what's in this]

@IN NS NS2.[what's in this]

e-document in A 192.168.9.14

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...