Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

626
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda