Microsoft Edge won't load local nginx website in Vagrant VM - nginx

I'm experiencing a strange issue with Microsoft Edge not loading a local Craft CMS website hosted inside a vagrant virtual machine. Any attempt to load the locally configured host name or IP, returns the "Hmm, we can't reach this page." error.
I have a line in my hosts file:
192.168.10.12 test.craft.dev
I've read various resources about Microsoft Edge not properly handling the hosts file properly, however not even the IPv4 address works either. I've tried several of the recommendations related to Internet Options tweaks but nothing works, it does seem however the hosts file is not the issue.
The network configuration uses NAT and sets an IP in the range of 192.168.10.x (defined by Homestead.yaml, if I assign a public_network and get an IP with my LAN network DHCP range, Edge can access this IP, but it doesn't explain why all other browsers work and Edge doesn't without it.
It's worth mentioning that the local Craft hostname will load fine in every other browser (including IE). Does Microsoft Edge have specific issues with loading local websites inside VirtualBox due to some network level issue?

Install and run fiddler. It will do everything automatically.

Edge browser seems to pay attention to the interface you are using to access your sites. My guess is that you are using Vagrant to launch a Virtualbox VM. My answer below assumes that you are accessing via a Virtualbox host-only network, or some other network interface that has an NdisDeviceType of 1.
What didn't work
None of the following worked for me:
Using about:flags and confirming that "allow localhost loopback" was on
Control panel, Network and Internet, Internet Options, Security and adding my site explicitly to Trusted Sites or Local Internet.
CheckNetIsolation LoopbackExempt -a -n="Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
My environment
In my case, I have VirtualBox 5.2.18 running on Windows 10 build 1803 "Spring Creators Update". Using Edge 42.17134.1.0. I have a host-only network for my VM guests. e.g. 192.168.7.0/24. I couldn't access addresses from my Edge on the VM host such as http://192.168.7.0. This site was hosted by a web server running in my VM guest. Note that this address worked just fine in Google Chrome, Internet Explorer 11 etc.
What worked
The solution is as follows:
Find the interface number for the host only network. I ran "route print" from the Windows command line and the first number shown in the "interface list" in my case was 17.
Use regedit to change the interface type from 1 to 0. The key is:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\XXXX
In my case XXXX was 0016 because my interface number was 17. I had to change *NdisDeviceType from 0 to 1. The * in that key name is a literal asterisk. I had to reboot for the changes to take effect.
The answer was gleaned from a post by "Jani L" dated Oct 3, 2017, on the first URL referenced below, but it didn't give a clue as to how to determine the interface number. The second reference below was the thread on which I originally posted this solution.
References:
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10142843/
https://social.technet.microsoft.com/Forums/en-US/0face535-3c7a-4658-be34-6c376322ca34/microsoft-edge-cant-open-local-domains
https://www.virtualbox.org/ticket/15565

It seems you are using Laravel Homestead box. If so, you can forward one of your host ports to the 80 port of your VM. Thus, you will be able to access your web sites hosted on your VM on MS Edge.
Here is what I've done:
ports:
- send: 8000
to: 80
If you don't want to have to type yourdomain.dev:8000 you may use fiddler. Thus, you will be able to only type yourdain.dev. :D

Related

How to access my localhost website from my phone?

Good day to all,
I am trying to create my website locally, and perhaps access the website through my phone from the localhost. Forgive me I am just a beginner.
So I used ipconfig -all to find my IPV4 address and it was e.g
192.168.1.102
And on the ASP.net webapplication I ran, the address was:
https://localhost:44337
Hence, I was trying to access this Web Application of mine created on my PC, to be accessed on my phone. On my phone, I entered the address:
192.168.1.102:44337
I went into my firewall setting to add a new rule for inbound connection to allow all ports to be connected as well. But it still don't work. Both my PC and phone is connected to the same wifi.
Does anyone know the fix? Thank you in advance.
You might have to configure an IIS server. This tool comes default in Windows (professional?), and there's lots of good resources on how to do this, all of which do a better job of explaining the process than I could do.
Essentially, you will need to:
Publish your site (Done through visual studio or cli)
Enable and configure your IIS
Create a new website in the IIS manager and point it towards the output of your web app publish
After opening the neccessary firewall ports, check to see in which IP address your web application is running. I am assuming you are using some sort of HTTP webserver software like IIS(windows) or Apache(Linux). In IIS to do that you must go to your site bindings and where it says "IP Address", select "All Unassigned" (NOT localhost or 127.0.0.1)so that the web application runs in all network adapters and IP addresses.
See full IIS documentation here: https://learn.microsoft.com/en-us/iis/get-started/getting-started-with-iis/getting-started-with-the-iis-manager-in-iis-7-and-iis-8
Follow the guide: https://medium.com/#manujsdeveloper/debug-a-website-local-or-remote-hosted-on-an-android-mobile-device-ff2c43527be1
You will need to set your phone in developer mode and get the OEM USB driver specific for your phone. and get a ADB running on your computer
I suggest supplement your knowledge with with links below, as some things are left out in the above guide and vice versa:
https://developer.android.com/studio/command-line/adb
https://developers.google.com/web/tools/chrome-devtools/remote-debugging

IIS 7.5 running on Win7 Pro - access through a port other than 80 or 8080

I'm not sure I can adequately explain my dilemma, but here goes...
Our company has its own web server at xyz.com. I have a Win 7 Pro machine running a non-HTTP server program that communicates with an iPhone app used by our field crews. The path to this machine from outside the network is abc.xyz.com, and it's set for port 5000. The app, then, is programmed to exchange data (ASCII only) with the server at abc.xyz.com:5000. The server program is written in VB, and the system works very well like that.
What I would like to do now is to add IIS to this same machine and open it on port 5001, so I can run asp.net pages that will enhance the functionality of the app for our crews. The URL would be abc.xyz.com:5001, and they will access it through their phone browsers.
I have IIS 7.5 installed on the machine, and I have started it running with the "default web site," and I have the binding set for port 5001. So far I am able to access the IIS "Welcome" page only from the same machine. I can't get it to come up on any other machine either inside or outside the network.
In searching for clues for this problem, all I read indicates that it's pretty much a snap to get a web server running on your Windows 7 machine. But it hasn't been so much a snap for me. I've checked the sharing settings and the security settings, they seem to be ok, as best I can tell.
I am hoping that someone will help me identify some obscure setting somewhere that I am overlooking and get this going. But I also even wonder if this is something that can't be done, i.e. because there's another server program using the same path running on port 5000.
By the way, I am not the network administrator. I try to avoid getting him involved because he's difficult to work with. I am hoping that this is just between me and my server.
Thanks for any insight anyone can give me.
You mention that you can access the website from the machine itself on port 5001, but you can't access the site from another computer within the same network - this suggests to me that the Windows 7 built-in firewall is blocking the request - as it's a non-standard IIS port.
You should configure the firewall to allow incoming requests on port 5001. Open a command prompt (as administrator) and run the following:
netsh advfirewall firewall add rule name='IIS Website on Port 5001' dir=in protocol=TCP localport=5001 action=allow profile=any
I found the answer elsewhere on StackOverflow. I needed to add IUSR to the list of authorized users. So far I have tested it on my iPhone browser using 3G and it came through. Seems likely that it will work from anywhere, but I'm not yet ready to declare total success.

Windows Server 2008 R2/IIS 7 refuses all outside tcp connections

I am unable to connect, for example, via http to a brand new installation of 64-bit Windows Server 2008. The server is on a domain, but is not DC (that's another problem altogether).
The IIS7 is running on the server and the website is accessible locally via http://localhost, but when I try to connect from another machine on the same network, the connections is refused, even though Windows Firewall is disabled.
I am able to connect to and browse the shared folders on the server using Windows Explorer, so it is not a physical connection issue. I can ping other machines on the network from the server, but trying to ping the server from another machine results in "Destination host unreachable".
As far as I can tell, the server refuses any TCP connections from any machine. I am thinking, there must be some other configuration setting that I am missing... Please, help.
NS
Like in Windows 7 the behaviour is determined by the network type (home, work, internet) the OS thinks it is connected to... even with a disabled firewall it respects these settings and accordingly refuses/allows connections...
The solution is embarrassignly simple, and the credit goes to Ashley Steel, on ServerFault.com for asking just the right questions. It turns out that the DNS was resolving the name of the server incorrectly, because the machine was named the same as an old, since decommissioned workstation that used to live on the same subnet.
The solution: rename the server.
NS[Now hiding under a rock]

Amazon EC2 Windows 2008 FTP Issues - Cannot get directory listing

Does anyone have a foolproof way to FTP to Windows 2008 EC2 Instances? I had mine working perfectly after following a lot of online guides from other users. Then it started deteriorating, intermittently giving a "Failed to get directory listing error". Login was still all fine. Now the error is permanent and I cannot update my web site.
Amazon, of course, won't respond to any emails unless I have a support package, yet they have no documentation on setting up FTP to their servers.
I was using old IIS6 based FTP - when I was able to connect and when it stopped working I tried the new FTP 7 as detailed here: http://learn.iis.net/page.aspx/263/installing-and-configuring-ftp-on-iis-7/
Now I cannot connect at all to the server, let alone getting a directory listing.
Please someone come to my rescue!
My default security group has ports 20 & 21 forwarding for my IP address. As per the article above I have ports 4900-4910 open to 0.0.0.0/0
My client is FileZilla using FTPS (was just FTP with IIS6 FTP server), Connecting with Passive falling back to Active.
I had this issue as well and its not the easiest thing to find a fix. The following link finally worked for me. Mainly the following.
In IIS, highlight the top-level server (not the FTP site). Click FTP Firewall Support. Under Data Channel Port Range, set a small range, e.g. 41000-41099. Under External IP Address to your Elastic IP Address.
Open the Windows firewall for the ftpsvc. DISable the StatefulFtp global setting:
netsh advfirewall firewall add rule name=FTP_Service action=allow service=ftpsvc protocol=TCP dir=in
netsh advfirewall set global StatefulFTP disable
From an administrative command prompt, restart the Microsoft FTP Service to make sure all the changes take effect:
net stop ftpsvc
net start ftpsvc
Open the corresponding 100 ports, e.g. 21 and 41000-41099, in your EC2 Security Group.

Network link between multiple VirtualBox machines

I am trying out a conferencing application (BigBlueButton).
For this I created an Ubuntu virtual machine that functions as the application server. On this machine I can test the application by navigating to the app url (for example http://10.0.2.15).
I also created a second virtual machine that should function as a client. On this machine I want to be able to navigate to the server as well, but that doesn't seem to be working. If I try to navigate from the client to the server by using the app-url I get nothing, followed by a timeout.
To establish a network between the two machines I tried the following solutions:
Create a second network adapter on each virtual machine and attach to "Host-only Adapter" with name "vboxnet0"
Create a second adapter on each machine and attach to "Internal network" named "intnet".
I thought that either of above options would be a good solutions, but none of them works.
Can anyone help me out here?
FYI I am using MacOS X as host system.
EDIT:
I created my second machine by cloning the first one (using the clone utility). Maybe this causes both machines to be identical which makes them indistinguishable on a network. Would this cause a problem? (As a desktop developer I'm a bit of a noob when it comes to I.T.)
I just got this to work. What I did was the internal network with the tasteful name on both VMs, but THEN I went to Advanced and set the Promiscuous Mode to "Allow All". I connect just fine now. Try it!
OK, just looked at the dates and it was last updated 2009, but for anyone looking for the answer, here you go!
IF you cloned the machine and didn't change the ip, they will never connect...
Also - make sure there is something listening on the url that you're trying to reach.
each machine should have a different ip
(but on the same network of-course)
Set the interfaces you created to internal networking. Choose a tasteful and interesting name, like "mynet". Use that name as the network name for both of the virtual machines and they will automatically be able to talk to each other over those interfaces.
Sorry, I see you already did that. In this case just give those two machines static IP addresses on the interfaces of "internal networking" type. Like, 192.168.0.2 and 192.168.0.3.
Also, once you've changed the IPs make sure the server is listening on the right interface.
I realize this is long overdue... But I just got mine set up and am able to ping each virtual machine from one another.
Assuming you're running boot2docker like I am, simply right-click the boot2docker VM in VirtualBox and click clone. In the box that pops up, be sure to check the box that says "Reinitialize the MAC address of all network cards" so that the two virtual machines don't have the same MAC address.
That's it, seems to be working for me. I can ping, scan (via nmap) and even SSH into the virtual machines from one another or from my host machine.

Resources