我刚刚在 AWS Elastic beanstalk 上部署了一个新的 laravel 7 应用程序。我注意到他们将 Apache 服务器更改为 Nginx 服务器。
https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platform-history-php.html
这是我的 api 后端 URL:http : //mappab-api-staging.mappab.com.br/
这是登录路线:http : //mappab-api-staging.mappab.com.br/login - 404 状态。
你有没有遇到同样的问题?我该如何解决?
我的 php.conf 放在 /etc/nginx/conf.d/elasticbeanstalk/ 是:
root /var/www/html/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ /\.ht {
deny all;
}
location ~ /.well-known {
allow all;
}
location ~ \.(php|phar)(/.*)?$ {
fastcgi_split_path_info ^(.+\.(?:php|phar))(/.*)$;
fastcgi_intercept_errors on;
fastcgi_index index.php;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type; …Run Code Online (Sandbox Code Playgroud)