zl程序教程

您现在的位置是:首页 >  前端

当前栏目

angular - 如何运行在起来 - 使用nginx

AngularNginx 如何 运行 起来 使用
2023-09-11 14:14:38 时间

nginx下载地址,使用的是标准版的:

点击下载nginx

 

nginx下载完后,解压

dist文件夹下面所有angular文件放入html文件夹中.

 

 

最后命令行cd到当前nginx.exe目录,启动命令:nginx

再配置一下conf文件夹下面的nginx.conf

 

 

再location / 添加一条:

try_files $uri $uri/ /index.html;

 

最后打开浏览器:http://localhost/index.html ,即可访问到示例.