It's possible that the issue is related to the nginx configuration in your Azure container. Make sure that the nginx configuration is set up to correctly route requests to your Laravel API endpoint.
Here are a few things you can try:
-
Check the nginx error logs in your Azure container to see if there are any errors related to the API endpoint.
-
Make sure that the nginx configuration in your Azure container is set up to correctly route requests to your Laravel API endpoint. You may need to modify the nginx configuration file to include the correct location block for your API endpoint.
-
Check that your Laravel API endpoint is correctly configured and that it is accessible from within the Azure container. You can try running a curl command from within the container to test the endpoint.
Here's an example of what the nginx configuration file might look like:
server {
listen 80;
server_name example.com;
root /var/www/html/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location /api {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
In this example, requests to the /api endpoint are routed to the Laravel API. Make sure that your nginx configuration file includes a similar location block for your API endpoint.