strange URL access to localhost

Problems with the Windows version of XAMPP, questions, comments, and anything related.

strange URL access to localhost

Postby vishnu27990 » 15. May 2015 07:51

Hi everybody,

i'm using XAMPP 1.8.1(v3.1.0.3.1.0) in windows 7 and i hv this strange issue .... if i type

http://-.-.movie/

it shows me my working directory(htdocs) ....as the same i can see by typing " localhost" in browser's address bar

so here

"http://-.-.movie/ " is equals to "localhost"

or any other address like in the same pattern

"http://a.b.movie/ " is equals to "localhost"

Note: i replaced -(dash) from the address with 'a' and 'b'

if i replace -(dash) with any other character it still showing the same result.......... but if i replace "movie" from the address it showing different result. i checked it in mozilla and chrome both....is there anybody who experiencing the same ???
vishnu27990
 
Posts: 1
Joined: 15. May 2015 07:48
Operating System: windows 7

Re: strange URL access to localhost

Postby gsmith » 15. May 2015 11:48

Actually, it's not so strange. Unless you are using VirtualHosts, Apache doesn't differentiate what hostname is used, there is no need for it to care. It will simply answer any http request to it's IP on the configured port.

If you are using VirtualHosts, the first Vhost is the "default" host and will answer all request to the IP that do not match any of the other VHosts ServerName that have been configured. This is clearly stated in the documentation.

http://httpd.apache.org/docs/2.4/vhosts ... d.html#alg
The default name-based vhost for an IP and port combination

If no matching ServerName or ServerAlias is found in the set of virtual hosts containing the most specific matching IP address and port combination, then the first listed virtual host that matches that will be used.
gsmith
 
Posts: 278
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16

Re: strange URL access to localhost

Postby Nobbie » 15. May 2015 13:38

gsmith wrote:Actually, it's not so strange.


I find it strange as well. Before the request is routed to the local Apache (127.0.0.1 or similar), there must be a DNS translation from a.b.movie to 127.0.0.1 or similar. If i enter "ping a.b.movie" in a shell, i receive an answer from 127.0.53.53 - what or who is responsible for that behaviour? I dont know very much about DNS, but this really looks strange.

P.S.: I played around a little bit and found out, that "movie" is a known hostname on my PC (running Ubuntu). Therefore http://a.b.movie can be resolved as a subdomain for "movie". If you try the same thing with an invalid hostname, for example "a.b.mofie", it cannot be resolved and the browser returns with a "ERR_NAME_NOT_RESOLVED" message. Interesting - why is "movie" assigned to 127.0.53.53??

P.P.S.: Googled around a little bit and going deeper: https://www.robtex.org/en/advisory/dns/movie/*/

Interesting.

(So actually - it is strange, isn't it?!). I did not know that. Did you?
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: strange URL access to localhost

Postby Altrea » 15. May 2015 15:56

We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: strange URL access to localhost

Postby Nobbie » 15. May 2015 16:33

Altrea wrote:A must read for 127.0 53.53 https://www.icann.org/resources/pages/n ... 3-12-06-en


I already read that, but there is no explanation, why *.movie is a registered DomainName. Thats what confuses me more.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: strange URL access to localhost

Postby gsmith » 15. May 2015 18:21

the "why" seems because .movie is one of the gazillion new TLDs that were recently opened up and this is to let you know b.movie may become a FQDN someday. Interesting that ICANN resolves this since they do not do it with the old TLDs. a.b.com does not resolve to 127.0.53.53, nor a.b.net, nor a.b.info. Not even a.b.ninja and .ninja is one of these new TLDs.

I wonder why they targeted, as far as I can tell, just .movie.

In my original post I assumed a.b.movie was probably set in the OPs hosts file. So it would not be strange why Apache answers in that situation, but yes, this resolving to 127.0.53.53 is where it becomes strange.
gsmith
 
Posts: 278
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 122 guests