【发布时间】:2018-08-16 09:17:45
【问题描述】:
我正在使用pingdom 测试我的网站:
https://tools.pingdom.com/#!/dCLQGc/https://stagingreport.daytwo.com
所有静态文件都从具有以下配置的 nginx 服务器提供
server {
listen 80;
gzip on;
gzip_vary on;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
if ($http_x_forwarded_proto = "http") {
return 301 https://$host$request_uri;
}
try_files $uri $uri/ /index.html;
}
}
因为我是使用谷歌云CDN我没有在服务器上设置任何缓存配置。
为了获得更高的性能分数 我应该更改 nginx 配置中的某些内容吗?
【问题讨论】:
标签: angular performance nginx google-cloud-platform cdn