I have a problem deploying Laravel to a shared hosting server.
This is how the the directory looks in the server.
|-Laravel(contents of Laravel project folders and files except public folder)
|
|-public_html
|
|-example.com(default subfolder))
|
|-contents of Laravel public folder
I created a folder called "Laravel" at the same level where the public_html folder is and threw all the Laravel project folders and files(except public folder) in there. Then I took everything that was in the public folder and put it in a subfolder in public_html.
Next I changed the index.php file like in the image.
I also changed .env file too(APP_ENV=production and APP_URL).
At this point I think I should be able to see something when I access to http://www.example.com/ but I get a 500 Internal Server Error.
My Laravel is version 7.15.0.
I appreciate if you could tell me what I'm doing wrong or what I should do. Any help would be appreciated as I have tried multiple methods with no success.
Thank you in advance.