Reputation: 25
i have server from Digital Ocean. I use Serverpilot. How do i domain routing using by laravel 5.3 ?
Rweb example :
Route::group(['domain' => 'admin.developer.app'], function () {
Route::get('/', function () { return view('dash') });
});
Route::group(['domain' => 'department.developer.app'], function () {
Route::get('/', function () { return view('dash') });
});
Upvotes: 0
Views: 179
Reputation: 3923
You need access to DNS zonefile settings at your DNS provider.
A
record for *
pointing to your server address).htaccess
file must be set up correctly that it catches all subdomains and renders developer.app
for your routing to work correctly. (I think the default laravel .htaccess
is fine)ServerAlias *.developer.app
to your VirtualHost config and restart the webserverUpvotes: 2