sunilbfcj's avatar

my .env file directly opening in browser on my server now all credentials are public

after deploying the laravel project on the server my .env file opened directly plz help me to figure out the actual problem.

Thanks

0 likes
4 replies
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

Your webroot should be in /public, not the root of laravel

sunilbfcj's avatar

@Sinnbeck Thanks it works I have created a new .htacces file in the root of laravel and now the public folder contains all files like index.php and all assets.

but now my assets have not been found it returns a 404 status code

Snapey's avatar

@sunilbfcj use the standard .htaccess

make the web server document root the public folder. Then all will be ok.

Please or to participate in this conversation.