Strange server not found issue

I am running ngginx + php-fpm on my Linode to serve up my website. I have a vhost setup for a random subdomain that I am using to test random stuff for my site. I purposely do not have a index.htm, index.html, or index.php in the web root, and these are the files that I have the vhost in nginx set to look for. As expected, when I visit my subdomain by typing, e.g. sub.mysite.com in my web browser, I get nginx's default forbidden message.

The problem comes when I try to visit one of the random subdirectories I have setup, e.g. if I go to sub.mysite.com/random, I get redirected to my ISPs search engine, which my ISP does by default when I try to visit a non-existent site. Strange thing is, the URL gets rewritten from sub.mysite.com/random to www.sub.mysite.com, which is NOT what I'm typing, and nginx is not setup to listen for a www at the start of the subdomain. I know my subdomain exists, so when I visit sub.mysite.com/random I should get directed to my server regardless of whether or not /random exists, and if /random does not exist, I should get nginx's not found error.

I was able to access my subdomain just fine yesterday, and I had added the subdomain the night before. My ISPs DNS seems to update itself every hour, while Linode updates every 15 minutes, and a 24 hour max propogation is mentioned in quite a few places. This means that having setup the subdomain the night before last, the subdomain should be working right, and it apparently is if I'm getting the expected forbidden message when I'm not trying to append anything on to sub.mysite.com.

P.S. If anybody is willing to test to see if it is possibly something strange with my ISP, the subdomain is http://tests.youdolinux.com/ , which again should give you a forbidden message, and I specifically want to access http://tests.youdolinux.com/adaptcms/ . I am on Verizon FiOS, which unfortunately seems to be the best for my area.

EDIT: I just placed a random HTML file in my subdomain's root. It seems to load correctly when I visit http://tests.youdolinux.com/ , though appending adaptcms to the end still does the strange www.tests.youdolinux.com redirect to Verizon's search for non-existent sites.

11 Replies

allsparc:/var/log# nslookup www.tests.youdolinux.com

Server: 203.12.160.35

Address: 203.12.160.35#53

** server can't find www.tests.youdolinux.com: NXDOMAIN

Im going to guess your isp is taking you to their error page for any domains that dont resolve..

@Internat:

allsparc:/var/log# nslookup www.tests.youdolinux.com

Server: 203.12.160.35

Address: 203.12.160.35#53

** server can't find www.tests.youdolinux.com: NXDOMAIN

Im going to guess your isp is taking you to their error page for any domains that dont resolve..

That's what their error page is for, though it shouldn't be directing my to www.tests.youdolinux.com since this is not what I'm trying to type. Since I am being directed to www.tests.youdolinux.com, and since I don't have a www.tests A-record, I will get the error page. I should be going to my Linode when I type tests.youdolinux.com.

I am thinking that there is a problem with my ISP. From my Linode, I did a nslookup to youdolinux.com, tests.youdolinux.com, and www.tests.youdolinux.com, then I did a ping, which confirms the results:

kris@li283-45:~$ nslookup youdolinux.com
Server:         207.192.69.4
Address:        207.192.69.4#53

Non-authoritative answer:
Name:   youdolinux.com
Address: 66.228.33.45

kris@li283-45:~$ nslookup tests.youdolinux.com
Server:         207.192.69.4
Address:        207.192.69.4#53

Non-authoritative answer:
Name:   tests.youdolinux.com
Address: 66.228.33.45

kris@li283-45:~$ nslookup www.tests.youdolinux.com
Server:         207.192.69.4
Address:        207.192.69.4#53

** server can't find www.tests.youdolinux.com: NXDOMAIN

kris@li283-45:~$ ping -c 4 youdolinux.com
PING youdolinux.com (66.228.33.45) 56(84) bytes of data.
64 bytes from youdolinux.com (66.228.33.45): icmp_req=1 ttl=64 time=0.032 ms
64 bytes from youdolinux.com (66.228.33.45): icmp_req=2 ttl=64 time=0.046 ms
64 bytes from youdolinux.com (66.228.33.45): icmp_req=3 ttl=64 time=0.045 ms
64 bytes from youdolinux.com (66.228.33.45): icmp_req=4 ttl=64 time=0.046 ms

--- youdolinux.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.032/0.042/0.046/0.007 ms
kris@li283-45:~$ ping -c 4 tests.youdolinux.com
PING tests.youdolinux.com (66.228.33.45) 56(84) bytes of data.
64 bytes from youdolinux.com (66.228.33.45): icmp_req=1 ttl=64 time=0.035 ms
64 bytes from youdolinux.com (66.228.33.45): icmp_req=2 ttl=64 time=0.058 ms
64 bytes from youdolinux.com (66.228.33.45): icmp_req=3 ttl=64 time=0.055 ms
64 bytes from youdolinux.com (66.228.33.45): icmp_req=4 ttl=64 time=0.056 ms

--- tests.youdolinux.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.035/0.051/0.058/0.009 ms
kris@li283-45:~$ ping -c 4 www.tests.youdolinux.com
ping: unknown host www.tests.youdolinux.com

I expected the results for www.tests.youdolinux.com, this shouldn't exist in the first place.

Doing this same tests from home:

piki@debian:~$ nslookup youdolinux.com
Server:         192.168.1.1
Address:        192.168.1.1#53

Non-authoritative answer:
Name:   youdolinux.com
Address: 66.228.33.45

piki@debian:~$ nslookup tests.youdolinux.com
Server:         192.168.1.1
Address:        192.168.1.1#53

Non-authoritative answer:
Name:   tests.youdolinux.com
Address: 66.228.33.45

piki@debian:~$ nslookup www.tests.youdolinux.com
Server:         192.168.1.1
Address:        192.168.1.1#53

Non-authoritative answer:
Name:   www.tests.youdolinux.com
Address: 63.251.179.13
Name:   www.tests.youdolinux.com
Address: 8.15.7.117

piki@debian:~$ ping -c 4 youdolinux.com
PING youdolinux.com (66.228.33.45) 56(84) bytes of data.
64 bytes from youdolinux.com (66.228.33.45): icmp_req=1 ttl=51 time=22.2 ms
64 bytes from youdolinux.com (66.228.33.45): icmp_req=2 ttl=51 time=19.6 ms
64 bytes from youdolinux.com (66.228.33.45): icmp_req=3 ttl=51 time=21.1 ms
64 bytes from youdolinux.com (66.228.33.45): icmp_req=4 ttl=51 time=21.0 ms

--- youdolinux.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 19.677/21.022/22.220/0.915 ms
piki@debian:~$ ping -c 4 tests.youdolinux.com
PING tests.youdolinux.com (66.228.33.45) 56(84) bytes of data.
64 bytes from youdolinux.com (66.228.33.45): icmp_req=1 ttl=51 time=27.4 ms
64 bytes from youdolinux.com (66.228.33.45): icmp_req=2 ttl=51 time=20.8 ms
64 bytes from youdolinux.com (66.228.33.45): icmp_req=3 ttl=51 time=20.6 ms
64 bytes from youdolinux.com (66.228.33.45): icmp_req=4 ttl=51 time=20.8 ms

--- tests.youdolinux.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 20.608/22.446/27.436/2.884 ms
piki@debian:~$ ping -c 4 www.tests.youdolinux.com
PING www.tests.youdolinux.com (63.251.179.13) 56(84) bytes of data.

--- www.tests.youdolinux.com ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3024ms

As you can see, the first two nslookups and pings match up, then goof up on www.tests.youdolinux.com. nslookup shouldn't even have an IP address for this, and ping should error out immediately as on the Linode results (I had to CTRL+C it to get the error).

Is anybody else able to reproduce the nslookup and ping results from my home box, in addition to being redirected to www.tests.youdolinux.com then to a site not found error when trying to visit tests.youdolinux.com? If this occurs outside of the Verizon network, then this probably isn't a Verizon issue to begin with, and I have a bit of troubleshooting to do. If it is Verizon-specific, then it's not my problem, and I'll need to contact Verizon to get their DNS fixed.

as i said. the results for the last domain arent being served by your ISP.

There are isps out there that if you attempt to visit a domain name that doesnt exist/resolve that they send you to their friendly error page.

going to tests.youdolinux.com takes you to your page as expected.

Your isp's dns servers are returning the IP of their error page when you attempt to nslookup/ping a domain name that doesnt resolve, like www.tests.youdolinux.com

sorry to post again. hit enter to early

http://tests.youdolinux.com/adaptcms/

is redirecting you to www.tests.youdolinux.com

allsparc:/var/log# wget --max-redirect=1 http://tests.youdolinux.com/adaptcms/
--2011-09-25 11:30:33--  http://tests.youdolinux.com/adaptcms/
Resolving tests.youdolinux.com... 66.228.33.45
Connecting to tests.youdolinux.com|66.228.33.45|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://www.tests.youdolinux.com/adaptcms/ [following]
--2011-09-25 11:30:34--  http://www.tests.youdolinux.com/adaptcms/
Resolving www.tests.youdolinux.com... failed: Name or service not known.
wget: unable to resolve host address `www.tests.youdolinux.com' 

so im guessing you have a redirect or problem within your webserver config

When I try to grab the IP from the nslookup from home to www.tests.youdolinux.com and paste it in my browser both at home and from my Linode, I actually get a 404 not found error. In Firefox, it is just a plain line of text saying "404 Not Found". I only see 404 errors when I try to connect to a live web server requesting a page that doesn't exist, so this is suggesting to me that there is a web server on this IP, though it is not my Linode's IP, and I doubt that IP would exist in the eastern USA where both my Linode and I are located (even though my Linode is in a different state, it's not too far away, I could get there in ~4 hours by car).

Eh? Moved temporarily? Something's broke in AdaptCMS (hence the name of the directory :-) ). First time using it, I have yet to find anything to recode in AdaptCMS (not that I'd know how), so if it's claiming that something's moved, they've probably broke something. That would explain my problem :-)

Im not sure what your getting at here?

You esentially have a few issues going on:

1. Your webserver config is attempting to redirect http://tests.youdolinux.com/adaptcms/ to http://www.tests.youdolinux.com/adaptcms/. You'll need to resolve this config error.

2. Your isp has a friendly error message page for servers that dont exist. your hitting it when you get redirected to www.test.*

Obviously there is a webserver on your ISP's error page server, or you wouldnt get their friendly error page.

Anywho, thanks for spotting that, I doubt I would've thought of a wget, especially since Verizon has had problems with their DNS in that past, and since I checked my vhost config 100,000,000,000,000,000,000,000,000 times in the past few hourse :lol:

@Internat:

Im not sure what your getting at here?

You esentially have a few issues going on:

1. Your webserver config is attempting to redirect http://tests.youdolinux.com/adaptcms/ to http://www.tests.youdolinux.com/adaptcms/. You'll need to resolve this config error.

2. Your isp has a friendly error message page for servers that dont exist. your hitting it when you get redirected to www.test.*

Obviously there is a webserver on your ISP's error page server, or you wouldnt get their friendly error page.

I'm getting at that there is a problem in the code of AdaptCMS, which I am attempting to house at http://tests.youdolinux.com/adaptcms/ . Since I have several other things under tests.youdolinux.com that work perfectly when I try to visit them (try /bbpress, /joomla, /pivotx, /vanilla, /wordpress, and /zikula and you will NOT redirect to www.tests.youdolinux.com), I have to assume that this is not a configuration error on my part.

Regardless, I have checked my config a bunch of times, and I'm confident it is correct. tests.youdolinux.com uses an almost exact copy of the vhost for youdolinux.com with the only difference (other than adjusting all the needed values to point it at the correct web root and logs) being that I removed the /home/user/public_html config, so tests.youdolinux.com/~kris gives a 404 Not Found error, but youdolinux.com/~kris gives you an actual web page. The youdolinux.com vhost file is also the same exact vhost file that I use for my webmail, forum, wiki, and phpmyadmin, which are all on different subdomains, and the only difference between each vhost is that I had to adjust for the different web roots and logs. I also use the same exact vhost configuration for arklinux.org and their forum and wiki, and their site was transfered over to my Linode from a non-Linode that ran apache (not nginx). All requests to both sites AND their subdomains are served up by the same exact nginx process, so the main nginx configuration is the same for each, and each site loads without any problems. To further my case, I am using nginx 1.1.0, which is a development version of nginx, and it is still serving everything up flawlessly. All this further convinces me that there isn't any configuration error.

EDIT: I would hardly consider Verizons errors to be friendly ;)

Case and point:

~~[http://youdolinux.com/~kris/images/verizonfriendlyerror.png" target="blank">](http://youdolinux.com/~kris/images/veri … _error.png">http://youdolinux.com/~kris/images/verizonfriendly_error.png](

And just to prove that my vhosts are configure right:

~~[http://arklinux.org/~kris/images/verizonfriendlyerror.png" target="blank">](http://arklinux.org/~kris/images/verizo … _error.png">http://arklinux.org/~kris/images/verizonfriendly_error.png](

EDIT 2: I just realized that the vhosts to my other subdomains mimic my tests vhost in that they don't have my /home/user/public_html, though the config is still otherwise exactly the same as youdolinux.com and arklinux.org.

Have you checked your adaptcms config to see if it has a redirector in it?

I can assure you its your server doing the redirect.

And obviously youve just changed something, because its no longer doing the redirect to www.

AdaptCMS wasn't configured, so there was no AdaptCMS config to check. I was trying to visit it to install it.

Sure, the server would do the redirect, because there was something in AdaptCMS's code that was causing it to do this. PHP has just as much power to force a server to redirect the client somewhere else as would a normal HTML redirect. My guess would be something in index.php – since AdaptCMS isn't configure yet, I would expect it to redirect to AdaptCMS's install script, which is what most CMS's/Blogs/whatever do when they haven't been configure yet. However, as you just witnessed, it wasn't redirecting to the correct location.

What changed is that I removed the adaptcms directory. If you attempt to visit http://tests.youdolinux.com/adaptcms, you will now get a 404 Not Found error rather than a redirect to http://www.tests.youdolinux.com/, which is non-existent.

I am going to try several versions of AdaptCMS to see what happens.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct