BaalInvoker@lemmy.eco.brtoSelfhosted@lemmy.world•I'm deploying a Laravel app on nginx. Only the main route works, every other throws me a 404English
1·
2 months agodeleted by creator
deleted by creator
Why are you using that?
location ~ /\.ht {
deny all;
}
You’re denying the access to your root, which is the public/
folder and has the file .htaccess
that has
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
This file handles the income requests and send to the front controller.
I’m not sure, but looks like you’re denying all .htaccess files. Laravel depends on .htaccess to make things work properly
Take a look on Laravel docs - Deployment to make sure your configs are right
I like Tesseract the most! It’s exactly a balance between Alexandrite and Photon
Well… If you’re a persona non grata in a genocidal country, you must be doing something right
The same US that’s sponsoring this genocide?