1.下载安装nginx
nginx: 下载nginx 中文网提供nginx中文文档nginx下载等内容
https://nginx.p2hp.com/en/download.html
稳定版就可以,下载完后将下载的压缩包解压
2.修改配置文件


主要修改端口,以及项目所在文件夹,直接放html下就行

server {
listen 80;
server_name localhost;#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root D:/Downloads/nginx-1.24.0/html/dist/;
index index.html index.htm;
}
- 注意 \ 要改为 /
- 最后也要有 /
3.运行nginx


















![[Linux]HTTP状态响应码和示例](https://img-blog.csdnimg.cn/direct/836e694c716c4b6baddadb7099dbbeed.jpeg#pic_center)
![[笔记]Spring AOP](https://img-blog.csdnimg.cn/direct/0cf3aa4762f3404ab1fe16628520c1f3.png)
