2014-08-27 48 views
0

我試圖爲我的節點應用程序設置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'

(source here)

你如何做到這一點的窗口?

+0

轉到Windows/SYSTEM32 /司機/ etc/hosts中的廣告時,它 – 2014-08-27 15:47:00

回答

2

這可以通過編輯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 

保存並大功告成

+0

很好,謝謝。 – Ally 2014-08-27 15:53:04

+0

@歡迎您:) – Vinz243 2014-08-27 15:53:18