搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

How to force Firefox to search localhost prior to searching the internet.

more options

I am building a new website on an Ubuntu 20.04 server with a LEMP stack. To test the web server (nginx) I set up a simple test site named nginxtest.com. Nginx server block tests are successful and there are no errors in any logs, so it appears that it is working properly. However, when I attempt to show the site by putting the site name into Firefox, all I get is a notice from Verizon that it has no knowledge of the website (which it shouldn't as it's not a registered name).

I want FIrefox to search localhost for my test site, but the only way I can make it work is to change the network-dns-native-is-localhost setting to true (default is false) in the about:config settings. When I change that setting, my test site pops right up, but then I can't reach any site on the internet.

How can I force Firefox to direct web searches to localhost before going out to the internet?

I am building a new website on an Ubuntu 20.04 server with a LEMP stack. To test the web server (nginx) I set up a simple test site named nginxtest.com. Nginx server block tests are successful and there are no errors in any logs, so it appears that it is working properly. However, when I attempt to show the site by putting the site name into Firefox, all I get is a notice from Verizon that it has no knowledge of the website (which it shouldn't as it's not a registered name). I want FIrefox to search localhost for my test site, but the only way I can make it work is to change the network-dns-native-is-localhost setting to true (default is false) in the about:config settings. When I change that setting, my test site pops right up, but then I can't reach any site on the internet. How can I force Firefox to direct web searches to localhost before going out to the internet?

所有回覆 (1)

more options

I'm not very familiar with DNS resolution on Linux, so bear with me.

It sounds as though you are using your standard ISP DNS and not Firefox's DNS-over-HTTPS (DoH) feature.

Have you set up an entry in the hosts file for this hostname <==> IP address pair? https://en.wikipedia.org/wiki/Hosts_(file)