The webroot should be in the public folder, the second error seems like your DB credentials aren't right or he can't connect.
Also the laravel.log give most of the time some useful errors, or temp enable debug.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Before i start, I need to mention that i am really beginner on laravel and web service things. I have working laravel web service on my localhost. I can reach it via localhost/api/teachers. I am getting JSON data as i wanted with no problem.
Now i need to upload my laravel web service to use it from host. I am getting "404 Error". I couldn't figure it out whats wrong. I have tried few things to solve it but didn't work.
I didn't change anything on .htaccess or index.php.
All of my laravel files at host under "/public_html/app/here"
I have changed .env file settings properly. This might be a silly mistake by me but i am very beginner.
When I try to access my api via my_domain.com/app/api/teachers(my function) it gives me an 404 error.
When I try to access my api via my_domain.com/app/public/api/teachers it gives me SQLSTATE [28000] Access denied for user_name@'127.0.0.1' (using password: yes)
Please or to participate in this conversation.