laravel 5 subdomain not working in live

2019-08-20 19:18发布

I have a site that can be access in stage.mysite.com now I want to have a subdomain for another page and it can be access at profile.stage.mysite.com.

in my server I have configured the hosting.

ServerAdmin webmaster@localhost
ServerName stage.mysite.com
ServerAlias *.stage.mysite.com
DocumentRoot /var/www/staging.mysite.com/public

in my routes.php this is the code.

Route::group(['domain' => 'profile.stage.mysite.com'], function()
{
    Route::get('/', 'FrontendController@profile');
});

but when I tried to access http://profile.stage.mysite.com returns Server not found error. any ideas how to access my static page into subdomain?

0条回答
登录 后发表回答