undefinedfix
Sign in

Access prompt 404 after configuring secondary domain name in laravel API interface

obidano edited in Tue, 19 Jul 2022

Problem description

The API interface of laravel 5.6 does not use dingo. Suppose the name of the project is project, which is accessed by IP http://ip/project/public/api/... No problem. Suppose the domain name is text.com , and now the secondary domain name is configured api.text.com Go to the root directory of the project and enter it in the browser http://api.text.com/public The default page of laravel can be displayed. There is no problem with the direct IP access interface, but using the http://api.text.com/public/ap... 404 is displayed when the

I'm not sure where the problem is. Is it necessary to configure the URL rewriting of Apache? Or is there a problem with the routing configuration of laravel? Seek the guidance of the great God

1 Replies
Ove
commented on Tue, 19 Jul 2022

The problem is solved. The domain name configuration is OK. The problem is http://api.text.com/public/in... Can be accessed, and http://api.text.com/public/ap... I can't access it. This is an Apache configuration problem. Please refer to the link https://blog.csdn.net/helloyu... It can be solved.

lock This question has been locked and the reply function has been disabled.