[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:
This is the important part: ``` <VirtualHost *:80> ServerName your-domain-or-ip...
Jump to solution
19 Replies
Dennis Koch
Dennis Koch5mo ago
If your panel is on the / directory that should be the default, right?
but in production NOT FOUND msg from apache with ubuntu
Try checking whether that route exists: php artisan route:list
MajistraFila
MajistraFila5mo ago
thanks for u r response, i checked with route:list and i found it
Dennis Koch
Dennis Koch5mo ago
Can you share a screenshot of the error?
MajistraFila
MajistraFila5mo ago
ok
MajistraFila
MajistraFila5mo ago
No description
Dennis Koch
Dennis Koch5mo ago
Of the error. Not the command
MajistraFila
MajistraFila5mo ago
ok sorry
MajistraFila
MajistraFila5mo ago
No description
Dennis Koch
Dennis Koch5mo ago
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.
MajistraFila
MajistraFila5mo ago
thank u for u r help, i went to 192.168.31.129/courrier/.env and gives same msg: NOT FOUND
Dennis Koch
Dennis Koch5mo ago
Okay. Did any page ever work with this setup? Probably not.
MajistraFila
MajistraFila5mo ago
u r right anything
MajistraFila
MajistraFila5mo ago
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.
MajistraFila
MajistraFila5mo ago
No description
MajistraFila
MajistraFila5mo ago
a little progress
Solution
Dennis Koch
Dennis Koch5mo ago
This is the important part:
<VirtualHost *:80>
ServerName your-domain-or-ip
DocumentRoot /var/www/html/your-project-name/public
<Directory /var/www/html/your-project-name>
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName your-domain-or-ip
DocumentRoot /var/www/html/your-project-name/public
<Directory /var/www/html/your-project-name>
AllowOverride All
</Directory>
</VirtualHost>
MajistraFila
MajistraFila5mo ago
one thing, i noticed when i typ "php artisan route:list --except-vendor " the line admin/login is not appeared
Dennis Koch
Dennis Koch5mo ago
Then you would access. 192.168.31.129/admin/login
MajistraFila
MajistraFila5mo ago
yeeees, thank u veeery much it was this line ServerName your-domain-or-ip, i should enter my ipaddress