Support the ongoing development of Laravel.io →
Installation Configuration
Last updated 5 months ago.
0

MAMP (regular) only supports one vhost and thus one document root. However, if you don't mind changing it for every project you work on (or if you only have one project), you can change the document root in the Apache preferences:

MAMP document root setting

The document root should be /path/to/laravel/public.

Last updated 5 months ago.
0

Event if you use Virtual Host it is not that difficult, change the VirtualHost root path point to public.

sudo nano /etc/apache2/sites-available/default
<VirtualHost *:80> 
    DocumentRoot "/home/[YOU]/lbc/public" 
    ServerName lbc.dev     
</VirtualHost>

Tutorial

Last updated 5 months ago.
0

Thanks for the prompt replies.

I tried both the solutions, and they worked for me ! :)

Unfortunately, I can mark only one as the solution :(

Last updated 5 months ago.
0

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.