laravel Firefox 无法连接到本地服务器子域
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33251155/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Firefox cannot connect to a local servers subdomain
提问by Just User
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 foundWhilst that opera and chrome working with me well
我正在开发 laravel 应用程序,我遇到了 Firefox 和 Safari 浏览器的问题,例如,当我需要使用子域访问我的 Web 应用程序时,sub.localhost/myapp/public
我看到 找不到服务器,而 opera 和 chrome 与我一起工作得很好
Any Suggestions ?
有什么建议 ?
回答by ricks
Best solution, supports multiple subdomains:
最佳解决方案,支持多个子域:
Type in this url
about:config
search fornetwork.dns.localDomains
double click the "value" field.
Enter your urls seperated by commas
www.localhost,app.localhost
输入此网址
about:config
搜索network.dns.localDomains
双击“值”字段。
输入以逗号分隔的网址
www.localhost,app.localhost
回答by Jason
The solution for me as of December 2016 on Firefox 50.0.2 is the about:config
setting network.dns.localDomains
:
截至 2016 年 12 月,我在 Firefox 50.0.2 上的解决方案是about:config
设置network.dns.localDomains
:
回答by meta.crescent
Visit about:config
on your browser then search for network.dns.native-is-localhost
about:config
在浏览器上访问,然后搜索network.dns.native-is-localhost
The default value is false
. Toggle to true
and you'll be good to go
默认值为false
。切换到true
,你就可以开始了
回答by FelDev
Editing your hosts filemight very well do the trick.
编辑您的主机文件可能会很好地解决问题。
It probably already has entries right now. For instance, OSX has these by default:
它现在可能已经有条目了。例如,OSX 默认有这些:
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.
OSX 上主机文件的路径是/etc/hosts
,因此sudo nano /etc/hosts
要对其进行编辑,对于 Linux也是如此。
Much credit goes to this answer
很多功劳归功于这个答案
回答by Praveen George
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)
将 'network.dns.disableIPv6' 设置为 false(默认为 true)对我有用。(如果你不知道如何设置,那么你可以转到下面的链接)
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
https://support.mozilla.org/en-US/kb/firefox-cant-load-websites-other-browsers-can
回答by Gizelle Emmanuel
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:
如果出现诸如 Firefox 找不到服务器这样的问题,则可能是网络问题。要修复它,请确保您的调制解调器/路由器都没有指示错误:
make sure internet security software is not blocking connections to the internet
check address for typing errors such as ww.example.com instead of www.example.com.
确保互联网安全软件不会阻止互联网连接
检查地址是否有输入错误,例如 ww.example.com 而不是 www.example.com。