laravel - 如何允许外部自定义域在我的服务器上运行 Laravel 应用程序?

标签 laravel ssl nginx cloudflare forge

我的应用是一个 Laravel 应用,运行在 Nginx 上,由 Forge 提供,SSL 证书由 CloudFlare 提供。

它托管在 https://www.myapp.com 之类的 URL 上。

我的应用程序的客户是企业,并且已经拥有他们的域:

https://www.customer1.com
https://www.customer2.com
https://www.customer3.com
etc.

我希望我的客户从他们选择的子域运行 MyApp:
https://some-name.customer1.com
https://some-other-name.customer2.com
https://any-name-they-want.customer3.com
etc.

我的客户应该 不是 安装任何东西——MyApp 仍然在 myapp.com 上运行,而不是在他们的服务器上

我的客户应该 仅限 (如果可能)修改他们的 DNS,可能添加一个 CNAME,如指向“myapp.com”的“some-name”

我关注了这篇精彩的文章:Dynamic custom domain routing in Laravel .

但我无法让它在 https(使用 SSL)环境中工作——浏览器返回:
This site can’t provide a secure connection
some-name.customer1.com uses an unsupported protocol.

ERR_SSL_VERSION_OR_CIPHER_MISMATCH

The client and server don't support a common SSL protocol version or cipher suite.

应该如何配置 Nginx 和/或 SSL 证书?

最佳答案

这仍然是一个不太简单的问题。
但是,Caddy 会自动生成 SSL(如果您可以选择用 Caddy 替换 Nginx)。
您可以查看文档以获取更多信息。

关于laravel - 如何允许外部自定义域在我的服务器上运行 Laravel 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55311887/

相关文章:

php - MySQL 查询防止嵌套树

mysql - Laravel Left join 向右表添加 where 子句

css - 侧边栏菜单下拉菜单从右边下来

asp.net - IIS 6网站下具体应用使用https

nginx - 如何让nginx停止处理其他规则并服务于特定位置?

mysql - 匹配关系最多的条目

javascript - Firefox 的有效 SSL 证书?

java - Azure VM 无法连接到 Azure SQL 服务

ssl - 将www。*域添加到certbot证书

http - 不需要的 HTTPS -> 使用 nginx + uwsgi + flask app 进行 HTTP 重定向