我想在本地主机上测试子域名。 我有以下说明:在启动服务器来运行应用程序之前,主机应该被配置以便应用程序能够支持多个用户的子域名。 要做到这一点,请在终端中键入sudo nano /etc/hosts
,然后将子域名添加到文件末尾,如下所示:
127.0.0.1 admin.daycare.no
127.0.0.1 daycare.no
127.0.0.1 worker.daycare.no
127.0.0.1 manager.daycare.no
127.0.0.1 parent.daycare.no
我按照上述说明进行操作,但在尝试检索URL时遇到了以下错误:http://daycare.no:3000/
Unable to determine IP address from hostname daycare.no
The DNS server returned: Name Error: The domain name does not exist.
This means that the cache was not able to resolve the hostname presented in the URL.
Check if the address is correct.
请问我该如何解决这个问题?