- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经在我的 Mac( Mojave )上使用 Homebrew 软件为 laravel 安装了代客泊车服务。根据laravel's documentation我现在应该可以 ping *.test,但是当我不断收到以下错误时:
ping:cannot resolve foobar.test: Unknown host
# Content of '/Users/<username>/.config/valet/dnsmasq.conf'
address=/.test/127.0.0.1
listen-address=127.0.0.1
scutil --dns
的输出
DNS configuration
resolver #1
search domain[0] : default
nameserver[0] : 192.168.1.1
if_index : 6 (en0)
flags : Request A records
reach : 0x00020002 (Reachable,Directly Reachable Address)
resolver #2
domain : local
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300000
resolver #3
domain : 254.169.in-addr.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300200
resolver #4
domain : 8.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300400
resolver #5
domain : 9.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300600
resolver #6
domain : a.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300800
resolver #7
domain : b.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 301000
resolver #8
domain : test
nameserver[0] : 127.0.0.1
flags : Request A records, Request AAAA records
reach : 0x00030002 (Reachable,Local Address,Directly Reachable Address)
DNS configuration (for scoped queries)
resolver #1
search domain[0] : default
nameserver[0] : 192.168.1.1
if_index : 6 (en0)
flags : Scoped, Request A records
reach : 0x00020002 (Reachable,Directly Reachable Address)
brew services list
的输出:
dnsmasq started root /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
httpd started root /Library/LaunchDaemons/homebrew.mxcl.httpd.plist
mysql started root /Library/LaunchDaemons/homebrew.mxcl.mysql.plist
nginx started root /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
php started root /Library/LaunchDaemons/homebrew.mxcl.php.plist
php@7.1 started root /Library/LaunchDaemons/homebrew.mxcl.php@7.1.plist
php@7.2 started root /Library/LaunchDaemons/homebrew.mxcl.php@7.2.plist
sudo brew services
restart dnsmasq
valet install
重新安装代客泊车服务sudo brew services restart --verbose dnsmasq
的输出
`Stopping `dnsmasq`... (might take a while)
==> Successfully stopped `dnsmasq` (label: homebrew.mxcl.dnsmasq)
==> Generated plist for dnsmasq:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.dnsmasq</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/dnsmasq/sbin/dnsmasq</string>
<string>--keep-in-foreground</string>
<string>-C</string>
<string>/usr/local/etc/dnsmasq.conf</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
/bin/launchctl enable system/homebrew.mxcl.dnsmasq
/bin/launchctl bootstrap system /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
==> Successfully started `dnsmasq` (label: homebrew.mxcl.dnsmasq)
failed to open pidfile /usr/local/var/run/dnsmasq/dnsmasq.pid: No such file or directory
dnsmasq
cd /usr/local/var/run/
中的文件夹所以我跑了
sudo mkdir dnsmasq
现在 ping 实际上返回以下响应:
PING foobar.test (127.0.0.1): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
...
This site can’t be reached
即使我已经创建了一个具有该名称的项目并使用
valet link foobar
链接了它.
This site can’t be reached
当我在浏览器中导航到 foobar.test 时。
curl foobar.test --verbose
时出现以下错误
* Rebuilt URL to: foobar.test/
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to foobar.test (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> Host: foobar.test
> User-Agent: curl/7.54.0
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
cat /usr/local/etc/dnsmasq.conf | grep -i interface
的输出:
# 10.1.2.3 to 192.168.1.1 port 55 (there must be an interface with that
# specified interfaces (and the loopback) give the name of the
# interface (eg eth0) here.
# Repeat the line for more than one interface.
#interface=
# Or you can specify which interface _not_ to listen on
#except-interface=
# If you want dnsmasq to provide only DNS service on an interface,
#no-dhcp-interface=
# even when it is listening on only some interfaces. It then discards
# working even when interfaces come and go and change address. If you
# want dnsmasq to really bind only the interfaces it is listening on,
#bind-interfaces
# that these two Ethernet interfaces will never be in use at the same
# Always give the InfiniBand interface with hardware address
最佳答案
请确认您有 /etc/resolver/test
包含此行的文件:nameserver 127.0.0.1
另外,编辑您的 /usr/local/etc/dnsmasq.conf
通过取消注释并更改此行来取消文件:
#interface=
interface=lo0
sudo brew services restart dnsmasq
重新启动服务然后再试一次。
dnsmasq
守护进程可能已绑定(bind)到某个不再可用的接口(interface)。
lo0
您会强制它只为始终存在的环回接口(interface)提供服务。我猜你不需要它在任何面向外部的接口(interface)上运行,因为我猜这都是为了开发目的。然而,如果你这样做,你可以添加更多这样的界面行:
interface=lo0
interface=en0
关于laravel - 为 laravel 安装了 Valet,但为什么 dnsmasq 不能正确解析?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56165635/
我刚刚尝试安装 valet 很长时间,但我找不到 any help任何地方。无论我尝试什么,它都一直在说: Zsh: command not found: valet 我在跑 Zshell (而不是
我正在尝试使用 valet for windows 在我的 windows 机器上设置本地开发环境。它适用于 laravel 和标准应用程序,但不适用于安装 wordpress。它返回一个 fatal
我在我的 mac 机器上安装 valet 时遇到这个错误。有人可以帮忙吗? Nginx cannot start; please check your nginx.conf [1: nginx: [e
我一直在使用 Laravel Valet 一段时间,但我刚刚遇到了一个让我紧张的情况:在创建了一个新的 Laravel 项目后,我去了 public目录并做了 valet link my_projec
我正在尝试设置 Laravel Valet ( Valet is a Laravel development environment for Mac )。一切正常,直到出现“代客安装”命令。此命令必须
我已经成功地遵循了设置 Mac Dev Machine 直到本教程:https://laracasts.com/series/setup-a-mac-dev-machine-from-scratch/
我通过 Web 服务将用户位置发送到服务器,在响应中我得到发送下一个位置的时间间隔。我正在使用以下调用使用定时器发送位置,但是当我得到不同的值时,定时器仍然使用旧值。我还尝试使计时器无效以设置新值,但
在一台电脑上使用几个旧的 Laravel 项目。看起来他们都用代客泊车。 Valet 没有在新项目上工作,我认为是因为 Valet 过度扩展了。 有没有办法“批量”取消停放和取消所有代客泊车连接,或者
好的,所以我遇到了一些很奇怪的事情。我的 phpinfo()显示一个版本,而 php -v显示另一个。 我在 MacBook Air (Mojave) 上本地运行,使用 Laravel 和 代客 .
我按照说明安装了 Valet,前 2 天运行良好,完全没有问题。然后突然间它停止工作,而且随着时间的推移似乎只会变得更糟。首先,除了主页之外的所有 Laravel 项目都出现 404 错误,最终网站完
我有一个错误。 $ valet install [DomainException] Unable to determine linked PHP. install 'w
我想与另一个开发人员一起开始一个新的 WordPress 项目。我们做出的决定是: 我们想使用 Bedrock 作为 WP 结构 我们想使用 Sage 作为 WP 主题 我们将项目放在 GIT 存储库
我尝试使用 Laravel 代客增加 php 的 memory_limit。 我所看到的: 与 phpinfo() 我懂了: memory_limit 128M 配置文件(php.ini)路径/usr
当我执行一个 PHP 脚本,它运行一个 cURL 请求到我的 Mac 上使用 Laravel Valet/dnsmasq 设置的 .test 域时,我打印了这个错误: Could not resolv
所以我在 Laravel/Valet 上工作,我尝试使用 ssl。所以我跑了: valet secure examplesite 这没有用。我已经卸载了 valet,清除了缓存,删除了 laravel
我已经在Macbook上升级了代客(运行Catalina),并遵循了laravel文档,包括重新运行valet install命令,并发现了意外的502 Bad Gateway错误。我正在查看日志,发
我使用 jquery 从所有具有 .my-images 类的 img 标签中选择所有图像 url 然后我尝试使用 jsPDF 将它们放入 pdf 捆绑文件中。像这样: //Creating the P
我正在将 WordPress 网站从服务器复制到本地 Valet 环境。 导出数据库时,我可以在 wp_options 表中看到 site_url 等行。 然而,当我通过 wp-cli 或 phpMy
在尝试加载我的 Laravel 项目时,我收到此错误 SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name
我目前正在切换到 Laravel Valet 作为一个简单的网络服务器,并在 project.test 下为我当前的元素提供服务。除我的 assets/css/style.css 文件外,所有内容(包
我是一名优秀的程序员,十分优秀!