LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-13-2012, 06:38 PM   #1
Anderl
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Rep: Reputation: Disabled
Why doesn't the subdomain work externally?


Hello guys,

I'm new here and I'm trying to setup a subdomain on my domain "neoplaygrounds.com".

I've setup Bind9 and it's working, I even checked logs and no errors - everything is working but I can only find subdomain in dig writing "dig @SERVER_IP cp.neoplaygrounds.com" or "dig @127.0.0.1 cp.neoplaygrounds.com" ( On nslookup I can do a lookup on nameservers & subdomain and works ) but if I try to run dig without @127.0.0.1 or @SERVER_IP it works but it doesn't say "(1 server found)" anymore and on Windows it doesn't even recognize on pinging nor on any browser.

Why that and what can I do?

By the way, here are logs and files if needed:

/var/log/syslog:

Quote:
Oct 14 04:04:33 vps named[4197]: starting BIND 9.7.3 -u bind -t /var/lib/named
Oct 14 04:04:33 vps named[4197]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-dlz-postgres=no' '--with-dlz-mysql=no' '--with-dlz-bdb=yes' '--with-dlz-filesystem=yes' '--with-dlz-ldap=yes' '--with-dlz-stub=yes' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=' 'CPPFLAGS='
Oct 14 04:04:33 vps named[4197]: adjusted limit on open files from 1024 to 1048576
Oct 14 04:04:33 vps named[4197]: found 2 CPUs, using 2 worker threads
Oct 14 04:04:33 vps named[4197]: using up to 4096 sockets
Oct 14 04:04:33 vps named[4197]: loading configuration from '/etc/bind/named.conf'
Oct 14 04:04:33 vps named[4197]: reading built-in trusted keys from file '/etc/bind/bind.keys'
Oct 14 04:04:33 vps named[4197]: using default UDP/IPv4 port range: [1024, 65535]
Oct 14 04:04:33 vps named[4197]: using default UDP/IPv6 port range: [1024, 65535]
Oct 14 04:04:33 vps named[4197]: listening on IPv6 interfaces, port 53
Oct 14 04:04:33 vps named[4197]: listening on IPv4 interface lo, 127.0.0.1#53
Oct 14 04:04:33 vps named[4197]: listening on IPv4 interface venet0, 127.0.0.2#53
Oct 14 04:04:33 vps named[4197]: listening on IPv4 interface venet0:0, 178.238.227.167#53
Oct 14 04:04:33 vps named[4197]: generating session key for dynamic DNS
Oct 14 04:04:33 vps named[4197]: set up managed keys zone for view _default, file 'managed-keys.bind'
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 254.169.IN-ADDR.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 100.51.198.IN-ADDR.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 113.0.203.IN-ADDR.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: D.F.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 8.E.F.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 9.E.F.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: A.E.F.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: B.E.F.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
Oct 14 04:04:33 vps named[4197]: command channel listening on 127.0.0.1#953
Oct 14 04:04:33 vps named[4197]: command channel listening on ::1#953
Oct 14 04:04:33 vps named[4197]: zone 0.in-addr.arpa/IN: loaded serial 1
Oct 14 04:04:33 vps named[4197]: zone 127.in-addr.arpa/IN: loaded serial 1
Oct 14 04:04:33 vps named[4197]: /etc/bind/178.238.227.rev:1: no TTL specified; using SOA MINTTL instead
Oct 14 04:04:33 vps named[4197]: zone 227.238.178.IN-ADDR.ARPA/IN: loaded serial 2012101301
Oct 14 04:04:33 vps named[4197]: zone 255.in-addr.arpa/IN: loaded serial 1
Oct 14 04:04:33 vps named[4197]: zone neoplaygrounds.com/IN: loaded serial 2006081401
Oct 14 04:04:33 vps named[4197]: zone localhost/IN: loaded serial 2
Oct 14 04:04:33 vps named[4197]: managed-keys-zone ./IN: loaded serial 0
Oct 14 04:04:33 vps named[4197]: running
Oct 14 04:04:33 vps named[4197]: zone 227.238.178.IN-ADDR.ARPA/IN: sending notifies (serial 2012101301)
Oct 14 04:04:33 vps named[4197]: zone neoplaygrounds.com/IN: sending notifies (serial 2006081401)
/etc/bind/neoplaygrounds.db:

Quote:
$ORIGIN neoplaygrounds.com.
$TTL 1d

neoplaygrounds.com. IN SOA ns1.neoplaygrounds.com. ns2.neoplaygrounds.com. (
2006081401
28800
3600
604800
38400
)

neoplaygrounds.com. IN NS ns1.neoplaygrounds.com.
neoplaygrounds.com. IN NS ns2.neoplaygrounds.com.
@ IN A SERVER_IP_GONE_HERE ( I USED EXTERNAL ONE, IS IT RIGHT? )
www IN A SERVER_IP_GONE_HERE ( I USED EXTERNAL ONE, IS IT RIGHT? )
cp IN A SERVER_IP_GONE_HERE ( I USED EXTERNAL ONE, IS IT RIGHT? )
ns1 IN A SERVER_IP_GONE_HERE ( I USED EXTERNAL ONE, IS IT RIGHT? )
ns2 IN A SERVER_IP_GONE_HERE ( I USED EXTERNAL ONE, IS IT RIGHT? )
Reverse DNS:

Quote:
@ IN SOA ns1.neoplaygrounds.com. ns2.neoplaygrounds.com. (
2012101301;
28800;
604800;
604800;
86400
)

IN NS ns1.neoplaygrounds.com.
IN NS ns2.neoplaygrounds.com.
167 IN PTR SERVER_IP_GONE_HERE ( I USED EXTERNAL ONE, IS IT RIGHT? )
/etc/bind/named.conf.options:

Quote:
options {
directory "/etc/bind";


forwarders {
8.8.8.8;
8.8.4.4;
};

auth-nxdomain no;
listen-on-v6 { any; };
};
/etc/bind/named.conf.local:

Quote:
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "neoplaygrounds.com" {
type master;
file "/etc/bind/neoplaygrounds.db";
};

zone "227.238.178.IN-ADDR.ARPA" {
type master;
file "/etc/bind/178.238.227.rev";
};

Last edited by Anderl; 10-14-2012 at 05:01 AM.
 
Old 10-14-2012, 07:46 AM   #2
Anderl
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
Bump.
 
Old 10-14-2012, 08:02 AM   #3
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
Bumping is against the LQ rules and also general netiquette.

I believe you need to put the following information in your httpd.conf (based on some googling):

Code:
Listen 80
NameVirtualHost *

<VirtualHost *>
  ServerName www.domain.com
  DocumentRoot /home/httpd/htdocs/
</VirtualHost>

<VirtualHost *>
  ServerName subdomain.domain.com
  DocumentRoot /home/httpd/htdocs/subdomain/
</VirtualHost>
You will obviously have to enter your own domain and directory structure.
 
Old 10-14-2012, 08:08 AM   #4
Anderl
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Snark1994 View Post
Bumping is against the LQ rules and also general netiquette.

I believe you need to put the following information in your httpd.conf (based on some googling):

Code:
Listen 80
NameVirtualHost *

<VirtualHost *>
  ServerName www.domain.com
  DocumentRoot /home/httpd/htdocs/
</VirtualHost>

<VirtualHost *>
  ServerName subdomain.domain.com
  DocumentRoot /home/httpd/htdocs/subdomain/
</VirtualHost>
You will obviously have to enter your own domain and directory structure.
Sorry, I was desesperated. I've been whole night searching and trying new configs lol

By the way, doing what you said I get these errors:

Quote:
root@vps:~# service apache2 start
Starting web server: apache2(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
failed!
EDIT: After running some codes, Apache2 finally ran without errors but the subdomain still doesn't work.

Here is what appears when I run "dig cp.neoplaygrounds.com":

Quote:
root@vps:~# dig cp.neoplaygrounds.com

; <<>> DiG 9.7.3 <<>> cp.neoplaygrounds.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19694
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;cp.neoplaygrounds.com. IN A

;; ANSWER SECTION:
cp.neoplaygrounds.com. 0 IN A 67.215.77.132

;; Query time: 17 msec
;; SERVER: 208.67.220.220#53(208.67.220.220)
;; WHEN: Sun Oct 14 18:36:21 2012
;; MSG SIZE rcvd: 55
This is what appears when I do "dig @127.0.0.1 cp.neoplaygrounds.com":

Quote:
root@vps:~# dig @127.0.0.1 cp.neoplaygrounds.com

; <<>> DiG 9.7.3 <<>> @127.0.0.1 cp.neoplaygrounds.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 61014
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;cp.neoplaygrounds.com. IN A

;; ANSWER SECTION:
cp.neoplaygrounds.com. 86400 IN CNAME 178.238.227.167.neoplaygrounds.com.

;; AUTHORITY SECTION:
neoplaygrounds.com. 38400 IN SOA ns1.neoplaygrounds.com. ns2.neoplaygrounds.com. 2006081401 28800 3600 604800 38400

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Oct 14 18:36:50 2012
;; MSG SIZE rcvd: 113
And this is what appears when I run "dig @localhost cp.neoplaygrounds.com":

Quote:
root@vps:~# dig @localhost cp.neoplaygrounds.com

; <<>> DiG 9.7.3 <<>> @localhost cp.neoplaygrounds.com
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 44316
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;cp.neoplaygrounds.com. IN A

;; ANSWER SECTION:
cp.neoplaygrounds.com. 86400 IN CNAME 178.238.227.167.neoplaygrounds.com.

;; AUTHORITY SECTION:
neoplaygrounds.com. 38400 IN SOA ns1.neoplaygrounds.com. ns2.neoplaygrounds.com. 2006081401 28800 3600 604800 38400

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Oct 14 18:37:22 2012
;; MSG SIZE rcvd: 113

Last edited by Anderl; 10-14-2012 at 08:36 AM.
 
Old 10-14-2012, 08:42 AM   #5
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 771
Blog Entries: 6

Rep: Reputation: 75
look at this

[rou@mga ~]$ dig neoplaygrounds.com in ns

; <<>> DiG 9.9.1-P4 <<>> neoplaygrounds.com in ns
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6825
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;neoplaygrounds.com. IN NS

;; ANSWER SECTION:
neoplaygrounds.com. 86400 IN NS ns1.no1http.com.
neoplaygrounds.com. 86400 IN NS ns2.no1http.com.
----------------

[rou@mga ~]$ nslookup cp.neoplaygrounds.com ns1.no1http.com
Server: ns1.no1http.com
Address: 91.215.156.61#53

** server can't find cp.neoplaygrounds.com: NXDOMAIN
 
Old 10-14-2012, 08:50 AM   #6
Anderl
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by routers View Post
look at this

[rou@mga ~]$ dig neoplaygrounds.com in ns

; <<>> DiG 9.9.1-P4 <<>> neoplaygrounds.com in ns
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6825
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;neoplaygrounds.com. IN NS

;; ANSWER SECTION:
neoplaygrounds.com. 86400 IN NS ns1.no1http.com.
neoplaygrounds.com. 86400 IN NS ns2.no1http.com.
----------------

[rou@mga ~]$ nslookup cp.neoplaygrounds.com ns1.no1http.com
Server: ns1.no1http.com
Address: 91.215.156.61#53

** server can't find cp.neoplaygrounds.com: NXDOMAIN
I can't understand what that means ( I mean, I understand that cp.neoplaygrounds.com cannot be found but I can't understand why that ), what can be the problem?

Last edited by Anderl; 10-14-2012 at 08:52 AM.
 
Old 10-14-2012, 09:18 AM   #7
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 771
Blog Entries: 6

Rep: Reputation: 75
the domain neoplaygrounds.com is registered to work only with ns1.no1http.com
which is not ns1.neoplaygrounds.com

what you have to do is contact registra ask them to point that domain to your
new dns server

after that only you can check the problem one by one
 
Old 10-14-2012, 09:28 AM   #8
Anderl
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by routers View Post
the domain neoplaygrounds.com is registered to work only with ns1.no1http.com
which is not ns1.neoplaygrounds.com

what you have to do is contact registra ask them to point that domain to your
new dns server

after that only you can check the problem one by one
"that domain" - What domain? neoplaygrounds.com or the nameserver ns1.no1http.com?

ns1.no1http.com
ns2.no1http.com

Both are from the server company, not from the registrar. The server company told me that I had to create a DNS server by myself.

Last edited by Anderl; 10-14-2012 at 09:31 AM.
 
Old 10-14-2012, 09:43 AM   #9
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 771
Blog Entries: 6

Rep: Reputation: 75
yeah that is right you have to create your own,
but they didnt tell you which is you need to inform them
after you done it

so please checking with "whois" command mostly available for linux system
otherwise you have to execute yum install jwhois (for RH family)
 
Old 10-14-2012, 09:50 AM   #10
Anderl
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by routers View Post
the domain neoplaygrounds.com is registered to work only with ns1.no1http.com
which is not ns1.neoplaygrounds.com

what you have to do is contact registra ask them to point that domain to your
new dns server

after that only you can check the problem one by one
"neoplaygrounds.com" is already poiting to the machine, I don't see what you mean by "point to the DNS server" ._. The domain itself works, only cp.neoplaygrounds.com doesn't.
 
Old 10-14-2012, 09:56 AM   #11
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 771
Blog Entries: 6

Rep: Reputation: 75
haha so fast you reply me ok then look here

please run whois so you will get like this

[rou@mga ~]$ whois neoplaygrounds.com |grep nameserver
nameserver: ns1.no1http.com
nameserver: ns2.no1http.com

for you please run "whois neoplaygrounds.com"

you have to make change on the domain registra first for nameserver
then all others A record will work

need to change to
ns1.neoplaygrounds.com
ns2.neoplaygrounds.com

until that, your problem will not solve
 
Old 10-14-2012, 10:02 AM   #12
Anderl
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by routers View Post
haha so fast you reply me ok then look here

please run whois so you will get like this

[rou@mga ~]$ whois neoplaygrounds.com |grep nameserver
nameserver: ns1.no1http.com
nameserver: ns2.no1http.com

for you please run "whois neoplaygrounds.com"

you have to make change on the domain registra first for nameserver
then all others A record will work

need to change to
ns1.neoplaygrounds.com
ns2.neoplaygrounds.com

until that, your problem will not solve
Oh, ok. Now I understood you. I'll do this and then I'll get back. It will start working after propagation of nameserver change? By the way, what should I put in nameserver IP? The IP of my machine, the IP of the answer from "dig ns1.neoplaygrounds.com" or the ones that are in /etc/resolv.conf?

I'm sorry for all these dumb questions, I'm starting with domain names now...

Last edited by Anderl; 10-14-2012 at 10:15 AM.
 
Old 10-14-2012, 10:16 AM   #13
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 771
Blog Entries: 6

Rep: Reputation: 75
for /etc/resolv.conf in the server
just need to have as below
nameserver 127.0.0.1

the thing you need to submit to them is

ns1.neoplaygrounds.com ns1_ip_address
ns2.neoplaygrounds.com ns2_ip_address

however once changed in the whois
please allow 72 hours for propagation
 
Old 10-14-2012, 10:38 AM   #14
Anderl
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by routers View Post
for /etc/resolv.conf in the server
just need to have as below
nameserver 127.0.0.1

the thing you need to submit to them is

ns1.neoplaygrounds.com ns1_ip_address
ns2.neoplaygrounds.com ns2_ip_address

however once changed in the whois
please allow 72 hours for propagation
I still didn't get that. What is the nameserver's IP? The machine's IP?
 
Old 10-14-2012, 10:48 AM   #15
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 771
Blog Entries: 6

Rep: Reputation: 75
Quote:
Originally Posted by Anderl View Post
I still didn't get that. What is the nameserver's IP? The machine's IP?
the ip is the machine ip you install bind
if you have 2 ip in the machine then submit both ip
one become ns1 and the other one become ns2

if you have another machine want to become ns2 is more welcome
mean you have ns1 and ns2 from diffrent machine this way more better
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS 6.2 - subdomain doesn't work and problems with making VirtualHost Gruszka1 Linux - Server 5 04-07-2012 09:50 AM
Google Hangout doesn't work, and Mplayer doesm't work without -ao alsa flagGoogle H ranban282 Linux - Software 0 02-20-2012 05:23 AM
Keyboard doesn't work right click on mouse doesn't work ramblinrick Linux Mint 2 10-15-2010 02:10 AM
Create webmail subdomain on Plesk master domain. (reserved subdomain) fruitwerks Linux - Server 0 08-11-2010 04:08 PM
logout in x doesn't work and nvidia doesn't boot Meriadoc Linux - Newbie 2 06-18-2004 01:32 PM


All times are GMT -5. The time now is 08:58 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration