简体   繁体   中英

How to configure Subdomain DNS when using Laravel domain route on shared hosting

Please how can I configure subdomain DNS when using Laravel domain route on shared hosting.

     Route::domain('me.domain.com')->group(function () {
        Route::get('/', function(){
           return "Hello, Welcome to my Laravel Domain Routing. Thanks You";
        });
     }]);

Thanks in Anticipation.

If you have cpanel in your sharing hosting account go to the option "Add Sub Domain" create the sub domain and set the folder as your laravel public project.

Sub domain

me.domain.com

Root directory

/var/www/laravel_project/public/

Also you have to create the record on your DNS account if you are managing apart.

Type          Name             Value                       TTL
-----------------------------------------------------------------------
A             domain.com       88.55.65.18 (server IP)     Automatic
A             me(sub domain)   88.55.65.18 (server IP)     Automatic

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM