구글에서 만든 소스로..
1. 설치
bash <(curl -f -L -sS https://ngxpagespeed.com/install) --nginx-version latest
2. 설정
mkdir /var/ngx_pagespeed-cache
chown nginx:nginx /var/ngx_pagespeed-cache
server {
listen 80;
server_name pagespeed.test.co.kr;
pagespeed on;
pagespeed FileCachePath /var/ngx_pagespeed-cache;
pagespeed DisableFilters rewrite_images,combine_css;
access_log /var/log/nginx/nginx-access.log combined;
location / {
root /var/www/test;
index index.html;
}
}
* 추가적인 내용
pagespeed on;
pagespeed FileCachePath /var/ngx_pagespeed-cache;
pagespeed statistics on;
pagespeed StaticsLogging on;
pagespeed LogDir /var/log/pagespeed;
pagespeed MessageBufferSize 100000;
'오픈소스 > nginx' 카테고리의 다른 글
nginx proxy 설정예제 (0) | 2018.05.04 |
---|---|
nginx openresty (0) | 2018.02.07 |
nginx 서버 파라미터 설정 (0) | 2018.02.07 |
nginx worker 설정 (0) | 2018.02.07 |
nginx keep alive (0) | 2018.02.07 |