Hello Friend,
I want to ask about laravel project hosting.
I upload my laravel 8 projects on the server. When I visit my website it returns a 403 error and when trying to access another page of the website it returns a 404 error. I just change my .env file.
As I know, godaddy is shared hosting, so the setup could be different, are you pointing to correct document root directory ? it should be public folder.
If the document root is correct, then it has to be the problem with file permissions. If you are not aware how it works, just set 777 on your storage folder and see if it helps, but don't forget to revert it back (its a bad thing for security). You can copy storage folder into another folder and then change the permissions, then see if it works and remove the storage folder again, and rename the copied folder to its original name (storage).
If you are not aware how to change file permissions in godaddy admin panel, just google it.
Tell me if it helps, 403 could be caused by a lot of things and you have to try some things, before you figure it out.
@imeda Yeah I create an index.html file and it works fine. but when I try to access the page through routes it returns a 403 error.
How can I solve this issue?
It seems to me that Apache might not be configured properly. I don't think the request is getting to your Laravel application. Can you post your apache (and/or .htaccess) configuration
Domain name don't achieve your Laravel project, May be issue is with vhost config. If you're using Apache (httpd) then I doubt you need to add <Directory> section to the <VirtualHost>:
<VirtualHost *:80>
...
<Directory "/url/to/your/public">
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
...
</VirtualHost>