26.09.29
0
조회 206
26.09.26
1
조회 163
26.09.24
0
조회 194
26.09.23
0
조회 197
26.09.19
0
조회 516
26.09.11
0
조회 153
26.09.10
0
조회 152
26.09.10
0
조회 151
26.09.10
0
조회 119
26.09.10
0
조회 103
26.09.09
1
조회 106
26.09.04
0
조회 506
26.09.03
0
조회 342
26.09.01
1
조회 140
26.08.29
0
조회 184
26.08.22
0
조회 298
26.08.20
0
조회 327
26.08.13
0
조회 319
26.08.13
0
조회 370
26.08.13
0
조회 213
댓글 3
XE rewrite 규칙은 짧은주소를 사용하기 위해 필요한 최소한의 규칙일 뿐이고요...
브라우저 캐싱은 직접 추가하셔야 합니다.
보통 아래와 비슷한 방식을으로 확장자를 지정한 후 expires 명령을 쓰지요.
location ~* \.(jpe?g|png|gif|bmp|ico|svg|flv|mp[34]|woff|ttf|css|js)$ {
expires 30d; # 30일
}
블로그에만 메모해버렸구나!
그래도 답변 감사합니다! ㅎㅎ
/etc/nginx/sites-enabled
이쪽으로 이동해서 서버 설정 파일오픈
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1M; #한달
access_log off;
add_header Cache-Control "public";
}
location ~* \.(?:css|js)$ {
expires 1y; #일년
access_log off;
add_header Cache-Control "public";
}
이걸 자기 서버단쪽에 추가
예시
server {
server_name 서버도메인;
root /home/서버폴더/public_html;
include xe.conf;
index index.html index.htm index.php;
location ~ \.php$ {
limit_req zone=limit burst=5 nodelay;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/서버폴더/public_html$fastcgi_script_name;
include fastcgi_params;
}
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}
location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "public";
}
}