配置

配置nginx

打开D:\wnmp\nginx-1.21.6\conf\nginx.conf文件,将

location / {
    root    html;
    index  index.html index.htm;
}

改为

location / {
    root    D:/wnmp/nginx-1.21.6/html;
    index  index.html index.htm;
}

#location ~ \.php$ {
#    root           html;
#    fastcgi_pass   127.0.0.1:9000;
#    fastcgi_index  index.php;
#    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
#    include        fastcgi_params;
#}

改为

location ~ \.php$ {
    root           D:/wnmp/nginx-1.21.6/html;
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include        fastcgi_params;
}

安装nginx的过程中已经启动了nginx,这是修改了nginx配置,只需要重新reload以下nginx即可:

nginx -s reload

配置MySQL

在安装MariaDB时候已经填写过账号密码,现在只需要通过phpMyAdmin管理数据库即可,下载phpMyAdmin 5.2.0解压到D:\wnmp\nginx-1.21.6\html目录,然后浏览器访问:http://localhost/phpMyAdmin-5.2.0-all-languages/