tvbeek liked this thread
Hello @barcovanrhijn it sounds as a frustrating situation.
Thanks for your detailed question and the list with what you've tried!
Some debug things I can think about are:
php artisan route:list
on your server?@Tvbeec it's a pickle.
Example Routes
Route::get('/', function () {
return view('welcome');
});
Route::get('/about', function () {
return view('about');
});
I'm considering All Routes except main give 404
So I'm currently testing some additions to .htaccess to see if this will solve the issue.
.htaccess
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
# Testing -- Suggested symlink additions
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
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>
sadorect liked this reply
Some strange things that could help (I found this type or problems both interesting and frustrating)
I see you use a relative path (I suspect from your root) Can you use an absolute path? ln -s /home/myuser/domains/example.com/laravel/public /home/myuser/domains/example.com/public_html/
What happen if you copy your public dir to your public_html and update the paths in index.php ?
Like require __DIR__.'/../vendor/autoload.php';
will be require __DIR__.'/../laravel/vendor/autoload.php';
@tvbeek Thanks for this suggestion.
I ended up deleting the entire deployment. You're right the symlinks are messing things up. In the end my conclusion is that the webserver is not following the symlinks correctly.
After redeploying and copying the index out and correcting the paths and setting the storage link things work as they should.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community