Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

yehudash's avatar
Level 18

Laravel 9 - show public directory in url

Hi, I've got a project that hardcoded all the static assets with 'public' in their path. In the prod server they set the root server to the root dir instead of root/public, the problem is when I try to run this locally with Laravel Herd I'm getting 404 on all the static assets because their path is 'site.test/public/img.png'.. Is there a way to work around this on the local server so I don't start the change all the project? Thank you.

I tried to find Herd nginx config for the project but did't find..

0 likes
1 reply

Please or to participate in this conversation.