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

401
Visualizações
Laravel API router always 404 not found, even I can see the laravel index page

OS:windows server 2019

Web server:Apache

Laravel:8.46.0

I clone this project from my other computer, the other computer is install XAMPP package.

This computer, I'm respectively install apache, mysql and php.

In the other one computer, all api url is working.

I'm already set the virturehost in httpd.conf as below.

About server name, I'm set my real domain name, not like this.

<VirtualHost *:80>
  DocumentRoot "C:\Apache24\htdocs"
  ServerName myDomainName
  ErrorLog "C:\Apache24\htdocs\project_name_error.log"
  CustomLog "C:\Apache24\htdocs\project_name_access.log" combined
  DirectoryIndex index.php
  <Directory "C:\Apache24\htdocs"> 
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

And when I go to my IP with browser, I can see the index page of laravel. but when I want to input a api url, it always show 404 not found. why?

I was trying api url just like this three:

http://domainName/project_name/public/api/
http://domainName/public/api/
http://domainName/api/

btw, in my other computer, I can input the first url to get my resources.

Any suggest?

Thanks.

over 4 years ago · Santiago Trujillo
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