[Solved]how to redirect all users to login page
i use this : Route::get('/', function () {
return redirect(route('filament.admin.auth.login'));
});
to redirect all to login page , but in production NOT FOUND msg from apache with ubuntu
Solution:Jump to solution
This is the important part:
```
<VirtualHost *:80>
ServerName your-domain-or-ip...
19 Replies
If your panel is on the
/
directory that should be the default, right?
but in production NOT FOUND msg from apache with ubuntuTry checking whether that route exists:
php artisan route:list
thanks for u r response, i checked with route:list and i found it
Can you share a screenshot of the error?
ok
Of the error. Not the command
ok sorry
Okay. Let's go back some steps, because this is not a Filament issue.
Your apache setup is wrong. You need to set the DocumentRoot.
public/
should never be part of the domain. Otherwise you probably expose your .env
(just check 192.168.31.129/courrier/.env
at it probably leeks your configuration)
Please search a tutorial on how to set up Apache for Laravel.thank u for u r help, i went to 192.168.31.129/courrier/.env and gives same msg: NOT FOUND
Okay. Did any page ever work with this setup? Probably not.
u r right anything
i followed this tuto https://www.webhi.com/how-to/how-to-install-laravel-on-ubuntu-debian-apache-nginx/ and im getting this for now
WebHi Tutorials & Documentations
Install Laravel on Ubuntu with Apache or Nginx - Tutorial & Documen...
Learn how to install Laravel on Ubuntu 20.04 22.04 18.04 using Apache and Nginx as web servers. Follow our step-by-step guide for a smooth installation process.
a little progress
Solution
This is the important part:
one thing, i noticed when i typ "php artisan route:list --except-vendor " the line admin/login is not appeared
Then you would access.
192.168.31.129/admin/login
yeeees, thank u veeery much
it was this line ServerName your-domain-or-ip, i should enter my ipaddress