【问题标题】:Laravel Valet with Apache + dnsmasqLaravel Valet 与 Apache + dnsmasq
【发布时间】:2020-01-22 07:00:35
【问题描述】:

我已安装 Laravel Valet 并将其配置为 .loc 域(工作正常)
然后我需要 Apache 服务器和 Laravel Valet,所以我按照以下说明操作:https://getgrav.org/blog/macos-mojave-apache-mysql-vhost-apc
我将 Apache 配置为服务于 .test 域。完成上述说明后,.test 域开始工作,但 Laravel Valet (.loc) 服务的站点停止工作。

当我打开任何 .loc 站点时,它会加载 localhost 页面(由 Apache 提供)。
我的虚拟主机:/usr/local/etc/httpd/extra/httpd-vhosts.conf 文件:

<VirtualHost *:80>
    DocumentRoot "/Users/daiyrbek/Sites"
    ServerName localhost
</VirtualHost>

# and few other exact hosts like: site1.test -> ~/Sites/site1

我想要的是:
.loc 应该由 Laravel Valet 提供服务
.test 应该由 Apache 提供服务

我的/usr/local/etc/dnsmasq.conf 文件:

address=/.test/127.0.0.1

conf-file=/Users/daiyrbek/.config/valet/dnsmasq.conf

/Users/daiyrbek/.config/valet/dnsmasq.conf文件:

address=/.loc/127.0.0.1
listen-address=127.0.0.1

如何解决这个问题?

【问题讨论】:

    标签: apache vhosts dnsmasq laravel-valet


    【解决方案1】:

    基本上不可能实现我想要做的事情,因为 Laravel Valet 的要求是:

    代客需要 macOS 和 Homebrew。在安装之前,您应该确保没有其他程序(例如 Apache 或 Nginx)绑定到您本地机器的 80 端口。

    https://laravel.com/docs/6.x/valet#installation

    【讨论】:

      猜你喜欢
      • 2019-07-08
      • 2020-01-01
      • 2021-02-23
      • 1970-01-01
      • 2020-04-07
      • 1970-01-01
      • 2020-02-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多