10

I'm working on laravel app ,i face issue with Firefox and Safari browser , when I need to access my web app with sub-domain for example sub.localhost/myapp/public I see Server not found Whilst that opera and chrome working with me well

Any Suggestions ?

EugZol
  • 6,476
  • 22
  • 41
Muhammad Atallah
  • 976
  • 2
  • 12
  • 34

6 Answers6

37

Best solution, supports multiple subdomains:

  1. Type in this url about:config search for network.dns.localDomains

  2. double click the "value" field.

  3. Enter your urls seperated by commas www.localhost,app.localhost

ricks
  • 3,154
  • 31
  • 51
  • 2
    Searched for a solution for over 3 hours, this is exactly what I needed. The result is the same with `network.dns.native-is-localhost`, but without any of its issues. – Twenty Mar 24 '20 at 21:09
  • 3
    A seemingly unnecessary restriction in FF that cost me (and probably others) hours of head-scratching. To save yourself having to re-edit this over and over again, you could opt for setting the value to `*.localhost` to cover all future cases. Now all I have to do is remember this crazy exception the next I rebuild my machine! *Correction* don't use *.localhost - I was lulled into a false sense of hope by the dns cache. I'm leaving the comment here to help prevent others fall into my trap. – Phil Blackburn Aug 02 '20 at 09:11
16

The solution for me as of December 2016 on Firefox 50.0.2 is the about:config setting network.dns.localDomains:

Jason
  • 6,878
  • 5
  • 41
  • 55
5

Editing your hosts file might very well do the trick.

It probably already has entries right now. For instance, OSX has these by default:

127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost

Simply append the subdomains you need to it, for instance:

127.0.0.1     mysubdomain.localhost

The path to your host file on OSX is /etc/hosts, so sudo nano /etc/hosts to edit it, same for Linux.


Much credit goes to this answer

Félix Paradis
  • 5,165
  • 6
  • 40
  • 49
3

Visit about:config on your browser then search for network.dns.native-is-localhost

The default value is false. Toggle to true and you'll be good to go

metacrescent
  • 313
  • 1
  • 8
  • 8
    WARNING: This makes your browser only access localhost. You wouldn't be able to use it for anything else. I had to refresh my browser and reinstall all my extension because i forgot what the settings name was. This is a terrible solution, no external scripts, images ect. would load on the page, no fonts, no CDN – ricks May 08 '19 at 22:02
-1

setting 'network.dns.disableIPv6' to false (default is true) did the trick for me.(If you dont know how to set this then you can go to the bellow link)

The following link may help you to resolve the problem for you. Try this.

https://support.mozilla.org/en-US/kb/firefox-cant-load-websites-other-browsers-can

Praveen George
  • 9,237
  • 4
  • 26
  • 53
-1

If a problem arises like firefox can't find server so, it might be a networking problem. To fix it make sure that your modem/router are both not indicating errors:

  1. make sure internet security software is not blocking connections to the internet

  2. check address for typing errors such as ww.example.com instead of www.example.com.

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140