【问题标题】:Dose not work laravel sub_domain On centos 7在centos 7上不起作用laravel子域
【发布时间】:2017-10-17 07:16:50
【问题描述】:

我有 Laravel 项目,我有这样的路线

Route::group(array('domain' => '{account}.mydomain.com'), function () {
   Route::get('/test', ['uses' => '\App\Http\Controllers\TetsController@index',   
       function ($account) {
      return view('Test');
  }]);
}]);

它可以在 localhost (windows,wamp) 上运行,但是当我在 centos 上迁移时它不起作用并向我发送此错误

无法访问此网站

找不到 test.mydomain.com 的服务器 DNS 地址。搜索 Google 测试支持 ir 登录 ERR_NAME_NOT_RESOLVED

【问题讨论】:

  • 不,它不存在。但在 Windows 上它可以正常工作
  • 这与 Laravel(也不是 CentOS)无关。只是您的 DNS 记录。

标签: php laravel laravel-5 subdomain centos7


【解决方案1】:

我在主机上使用 cloudflare,并在 DNS 部分添加 * 并正常工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-03-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-20
    • 2016-12-23
    相关资源
    最近更新 更多