run php8 first

php-cgi.exe -b 127.0.0.1:9999

config for nginx.conf

http {
    include       mime.types;
    default_type  application/octet-stream;
    server {
        listen       80;
        server_name  localhost;
# Declares here, so that $document_root is able to find php files
root www;
        location / {
            index  index.html index.htm;
        }
# For PHP files, pass to 127.0.0.1:9999
location ~ \.php$ {
fastcgi_pass   127.0.0.1:9999;
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
include        fastcgi_params;
}
    }
}
run nginx
start nginx
for check service is running
tasklist /fi “imagename eq nginx.exe”
untuk stop nginx
nginx -s stop