Access subdomain.localhost in Windows 10 Edge

I’m trying out Windows 10 and I have a problem with accessing my local sites served by Apache. I access every site with a subdomain on localhost so as to achieve best isolation of browsing sessions. However, Edge won’t load subdomains at all, only the bare localhost:

http://localhost/
http://127.1.0.0/

will load fine. Actually, I learned that localhost access was blocked on purpose but eventually allowed by default with a hidden preference: http://security.stackexchange.com/questions/96418/localhost-loopback-risk

However, this still doesn’t allow subdomains:

http://sub.localhost/

My subdomains are set in hosts file and in Apache virtual hosts config. All browsers are fine with them, even IE, except Edge. Any way to solve this?

L_J,

Two things come to mind:

  1. Win10 is an upgrade to Win7/8 so, if you have your Apache code within Program Files, you must remember to make changes as administrator. Since other browsers are working properly, this is not the case for you.

  2. As one of millions of Tech Preview Reviewers, I saw very little of Edge from M$ so my guess is that it’s still got many rough edges (I’m sticking with Chrome/Firefox). IMHO, bleeding edge technology should be avoided if at all possible - with Edge, it appears mandatory (based on your experience).

Oh, I’m sure it was a typo but localhost is 127.0.0.1, not 127.1.0.0. IF you made that error in your stackexchange.com modification, that may be the cause of your Edge problem.

Regards,

DK.

I have Apache outside Program Files because I used a zip file from apachelounge.com instead of the official installer.

Yes, it’s got its rough edges but still I would like to test sites in it even if I don’t normally use it.

Yes, it was a typo, thanks. And I don’t have 127.0.0.1 in any of my config files (hosts nor Apache) so this shouldn’t be problematic anyway.

One weird thing I’ve just noticed! - I have several configured local subdomains and all of them work in Edge except one! I have no idea why only this one doesn’t work, I have looked at my configs over and over and I didn’t spot any errors not differences from other subdomains. For some reason Edge doesn’t like the one and refuses to connect. So I applied a simple workaround - I simply set up another subdomain to point to the same site and it works! So now I have this in hosts:

127.0.0.1 sub.localhost
127.0.0.1 sub2.localhost

and in apache config:

<VirtualHost *:80>
ServerName sub.localhost
DocumentRoot S:\www\sub
</VirtualHost>

<VirtualHost *:80>
ServerName sub2.localhost
DocumentRoot S:\www\sub
</VirtualHost>

So now sub.localhost doesn’t work in Edge while sub2.localhost works! Both work in other browsers. I just can’t understand what weirdness resides in Edge to behave that way. At least I have a workaround.

L_J,

I was going to rant about how (in ancient history) I had written FORTRAN code to submit to a FORTRAN-to-ALGOL translator for the university’s Burroughs 5500. The @#$% thing would NEVER work right and, ultimately, I found that I had picked a variable name that the translator had reserved for itself (no documentation was available for the translator). I was simply doomed by my “originality” and I had suspected that you may have hit on “sub” in the same way.

I just noted, however, that you’re using WinDoze code within your Apache httpd_vhosts.conf file. Because Apache grew up in the Linux world, it understands /'s rather than 's ('s typically “escape” the following character) so try using /'s. That certainly does not account for sub2 working but who knows? Stranger things can happen in the translation from WinDoze-speak to Linux-speak! :smiley:

Regards,

DK

It seems unlikely to be a reserved word. What’s weird is that I have the same setup on another computer with Win 10 and there’s no problem accessing the same subdomain there…

Indeed - but even after using /'s the problem didn’t go away. I think this problem sits earlier, before Apache, maybe issues with local DNS resolution or something.

Anyway, thanks for your feedback, I’ll just live with my workaround for now and the remaining mystery…

AFAIK it is not a reserved word for Apache.
And I wouldn’t think it is for Windows either.

But it is for Visual Basic, so maybe

Sorry, sub was just an example, the actual word used is kurier.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.