主要下关于nginx的配置文件的配置default.conf
server {
listen 80;
server_name localhost;
# /usr/share/nginx/html;
# index index.html index.htm index.php;
location / {
root /usr/share/nginx/html/lease-contract/frontend/dist;
# if ($request_method = 'OPTIONS') {
# return 200;
# }
try_files $uri $uri/ /index.php?$query_string;
index index.html index.htm index.php;
}
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root /usr/share/nginx/html;
#}
location ~\.php?{
root /www/lease-contract/backend/public;
#root /www/lease-contract;
# try_files $uri $uri/ /index.php?$query_string;
fastcgi_pass php74fpm:9000;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}