我的操作系统是Windows 7,我正在使用。我当时正在学习这教程,但是当我试图打开网页时,我被困住了,因为我的浏览器说它无法建立连接。
variables.env (其余是默认的):
# Application
WEB_DOCUMENT_ROOT=/project/public
WEB_ALIAS_DOMAIN=localhost
APPLICATION_CACHE=/project/cache
APPLICATION_LOGS=/project/logs
# production | development | staging | testing
APPLICATION_ENV=development东道主:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# 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
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 localhost然后我发现有一个叫做Kitematic的程序已经安装了Docker工具,所以我打开它,看到了我所有的容器。我去了"wildlife_app_1“,这是我的web服务器,我看到了一个控制台,其中有一个警告:
[WARNING] WEB_DOCUMENT_ROOT does not exists with path "/project/public"!有一个名为"exec“的按钮,它允许打开容器的终端,所以我打开了它,发现在"/project”中实际上没有"public“这样的目录。
有人知道怎么解决这个问题吗?提前感谢!
发布于 2017-07-04 11:06:44
以下是一个解决办法,而不是一个解决方案,但无论如何。我改变了“。”配置文件中的点与项目目录的绝对路径。
在此之前:
- ./application:/project
- ./cache:/project/cache
- ./logs:/project/logs之后:
- C:/Users/Dmitriy/Desktop/projects/Wildlife/application:/project
- C:/Users/Dmitriy/Desktop/projects/Wildlife/cache:/project/cache
- C:/Users/Dmitriy/Desktop/projects/Wildlife/logs:/project/logs现在起作用了。
发布于 2017-07-02 12:02:41
您必须在hosts文件中使用您的主机(本地机器IP)。192.168.1.129。注意:例如,这里的192.168.1.129 IP地址。
您通常可以使用命令提示符或终端快速找到信息。在Windows中,您可以打开“开始”菜单,搜索命令提示符,然后按Enter键。然后在出现的命令提示符中键入ipconfig,然后按Enter键--您很快就会找到要查找的内容。

https://stackoverflow.com/questions/44869920
复制相似问题