发表于: 2020-06-05 22:15:14

1 1582


今天完成的事情:

1. nginx 动静分离

nginx 配置文件:

    server {

        listen       80;

        server_name  localhost;

        location / {

            # root   html;

            # index  index.html index.htm;

            proxy_pass http://localhost:8080;

        }

        

        location ~* \.(gif|jpg|jpeg|png|css|js|ico)$ {

        root D:\pic;

        }

}


匹配到以指定扩展名的请求都转发到本地路径,其他的都会转发到应用服务器地址。


2. 完成了项目,并且进行了测试与演示


明天的计划:

1. 任务三深度思考



遇到的问题:

1. jetty 的 access log 响应时间没有调出来

之前调过的,真的忘记了,jetty 的模块化管理配置文件太多了

解决的方法,用 postman 测一下响应时间:


收获:

简单的配置了 nginx 的动静分离。





返回列表 返回列表
评论

    分享到