Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

632
Views
How to fix Laravel Error 404 in acceptance environment?

I try to install my Laravel application in a new environment acceptance,

After composer install (no errors)

when I check the url it's redirected to /login which is normal

The problem: it returns 404 error and this error is coming from the server not from Laravel because I customized 404 error in my application

enter image description here

it seems like the server does accept only / path :

also when I change the router :

from

Route::get('/', function () {
    if (Auth::check()) return redirect('/myprofile');
    return redirect('/login');
});

To this:

Route::get('/', function () {
    return 'hello world'
});

it works and I can see hello world

the route /login exists when I route:list

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

First check if Apache's mod_rewrite module is enabled, If it's not enabled aleady please run below commands to enable it or else jump to second part of the answer

sudo a2enmod rewrite
sudo service apache2 restart

Also add below config block in your virtual host configuration to enable laravels .htaccess rules

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

Change /var/www/ path accordingly

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!