server {
    listen 80;
    server_name aizhct.local.internal;
    index index.html index.php index.htm default.php default.htm default.html;
    root /workspace/zhct/zhctproject/ai_api/public;

    location / {
        if (!-e $request_filename) {
            rewrite ^/(.*)$ /index.php/$1 last;
        }
    }

    add_header X-Content-Type-Options "nosniff";
    add_header X-XSS-Protection "1; mode=block";
    add_header Content-Security-Policy "manifest-src 'self'";

    include enable-php7.4.conf;

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
        expires 30d;
    }

    location ~ .*\.(js|css)?$ {
        expires 12h;
    }

    location ~ /.well-known {
        allow all;
    }

    location ~ /\. {
        deny all;
    }

    access_log /workspace/wwwlogs/aizhct.yyangpt.cn.log main;
    error_log /workspace/wwwlogs/aizhct.yyangpt.cn.error.log warn;
}
