在windows上为localhost设置local.host别名
问题描述:
我试图为我的节点应用程序设置everyauth。虽然我已经达到了一个我不知道如何完成的步骤。在windows上为localhost设置local.host别名
它要求设置local.host
作为localhost
的别名,但它引用了一些linux文件夹,我使用的是windows。
下面是我难以接受的确切指示。
重要 - 一些OAuth提供程序不允许回调本地主机,因此您需要创建一个名为local.host的localhost别名。确保你设置你的/ etc/hosts,以便127.0.0.1也与'local.host'关联。所以,你的/ etc/hosts文件中,其中一条线的样子: '127.0.0.1本地主机local.host'
你如何做到这一点的窗口?
答
这可以通过编辑hosts
文件来完成。以管理员身份打开记事本++(或记事本)。然后打开,并选择C:\Windows\System32\drivers\etc\hosts
。你会看到:
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# ...
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
::1 localhost
,并在末尾加上这一行:
127.0.0.1 local.host
保存并大功告成
转到Windows/SYSTEM32 /司机/ etc/hosts中的广告时,它 – 2014-08-27 15:47:00