server {
    listen 80;
    server_name localhost;
    root /usr/share/nginx/html;
    index index.html index.htm index.php;

    # 前端静态页面
    location / {
        try_files $uri $uri/;
    }

    # PHP告警接口
    location /api {
        fastcgi_pass php:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/api/index.php;
        include fastcgi_params;
    }
}
