[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 Koch11mo 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
MajistraFilaOP11mo ago
thanks for u r response, i checked with route:list and i found it
Dennis Koch
Dennis Koch11mo ago
Can you share a screenshot of the error?
MajistraFila
MajistraFilaOP11mo ago
ok
MajistraFila
MajistraFilaOP11mo ago
No description
Dennis Koch
Dennis Koch11mo ago
Of the error. Not the command
MajistraFila
MajistraFilaOP11mo ago
ok sorry
MajistraFila
MajistraFilaOP11mo ago
No description
Dennis Koch
Dennis Koch11mo 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
MajistraFilaOP11mo 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 Koch11mo ago
Okay. Did any page ever work with this setup? Probably not.
MajistraFila
MajistraFilaOP11mo ago
u r right anything
MajistraFila
MajistraFilaOP11mo 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
MajistraFilaOP11mo ago
No description
MajistraFila
MajistraFilaOP11mo ago
a little progress
Solution
Dennis Koch
Dennis Koch11mo 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
MajistraFilaOP11mo ago
one thing, i noticed when i typ "php artisan route:list --except-vendor " the line admin/login is not appeared
Dennis Koch
Dennis Koch11mo ago
Then you would access. 192.168.31.129/admin/login
MajistraFila
MajistraFilaOP11mo ago
yeeees, thank u veeery much it was this line ServerName your-domain-or-ip, i should enter my ipaddress
Want results from more Discord servers?
Add your server