I have a web server running locally that's mapped to project.name.localhost:3011 on a MacOSX box. My /etc/hosts defines:
127.0.0.1 project.name.localhost
I need to browse to this server in Chrome and Firefox. Chrome works great when I visit http://project.name.localhost:3011/. Firefox gives an "Unable to connect" connect error. I can see in my local server's console that no connection attempt was even sent to the server when I try from FF.
This is on FF version 59.0.2 (64-bit). FF has no problem with public internet sites like this one, and google.
I've already tried all of the steps suggested here: https://support.mozilla.org/en-US/kb/firefox-cant-load-websites-other-browsers-can In summary, those steps are:
- Check proxy settings, verify proxy is turned off
- Set
network.dns.disableIPv6
to true inabout:config
- Set
network.dns.disablePrefetch
to true inabout:config
- Cleared all history, including cookies and cache
Also tried disabling HSTS as described here: https://support.mozilla.org/en-US/questions/1204380
ping project.name.localhost
works just fine also. There is no local DNS issue.
http://127.0.0.1:3011/ gives me the exact same error as using the hostname. However, I need to access the server via a hostname. It is not and should not be configured to respond on a direct IP.
How can I get FF to hit my local web server via a hostname?
EDIT: Two co-workers experienced what they describe as the same problem when they setup their systems, but they both said "it just went away on its own" after a day or two. My problem has persisted across weeks and reboots.
Console output from request:
GET http://global.appen.localhost:3011/invoice_groups
Request headers (398 B)
Accept
text/html,application/xhtml+xm…plication/xml;q=0.9,*/*;q=0.8
Accept-Encoding
gzip, deflate
Accept-Language
en-US,en;q=0.5
Cache-Control
no-cache
Connection
keep-alive
Host
global.appen.localhost:3011
Pragma
no-cache
Upgrade-Insecure-Requests
1
User-Agent
Mozilla/5.0 (Macintosh; Intel …) Gecko/20100101 Firefox/59.0
Network Timing:
Blocked: → 1 ms
DNS resolution: → 1 ms
127.0.0.1 myname.localhost
– Seraglio