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

397
Views
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
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!