Yii2 App Advanced Project - API module dont work

Hi,

In my open-source project that i show here before:

https://github.com/prsolucoes/yii2-app-advanced/tree/module-api

Im developing in branch "module-api" an API folder with all exclusive configurations for it. I have create sample controllers. But it is not accessible from browser, sending the user to default site/error page.

I have validated all, check all, but i dont identify what is wrong. None of /api/controllers is working, request dont go to API controllers.

Can anyone help me?

Nginx config:

Some logs are attached too and here:

I have the same problem of this user:

https://forum.nginx.org/read.php?11,262720

If i change nginx config from:


location /api {

...

}

To:


location /api2 {

...

}

It works. So, whats wrong in nginx?

Nothing until now. I put a breakpoint in /api/web/index.php but not happen, if i put in /frontend/web/index.php and access http://yii2-app-advanced.local/api/customer/login it stop on frontend index.php, but not api index.php.

Very confusing and i dont know what is worng.

I do some return statement on nginx to try understand, some infos:

Admin works and API not. Why?

Can anyone help me with this?

Thanks.

Please, help me. I dont know more what to do. I dont understand where is the problem.

Hi,

The problem is not solved. I dont know why the location /api dont call /api/web/index.php, but instead on stop on it, i rename folder to "ws", and now /api call /ws/web/index.php.

I dont know if is a bug/problem with "alias" or "try" nginx commands.

If anyone understand about it, please, help me, because my intention is use folder name "api".

Thanks.