기본 콘텐츠로 건너뛰기

8월, 2014의 게시물 표시

Meteor에서 웹서버 설정 - nginx

http://www.andrehonsberg.com/article/install-nginx-141-meteor-js-websocket-ubuntu-1204 3000->80포트 포워딩하느라 nginx를 사용하긴 했는데 (그리고 ssl도 해야하고 등등) 맘에 걸리는 점이 두가지 있었다. gzip을 안써도 되나 정적 resource를 meteor가 다루지 않도록 해야 그래서 찾아보니  http://stackoverflow.com/questions/18003689/recommended-nginx-configuration-for-meteor  이런 글이 있더라 딱 내가 찾던거네! 근데, meteor에선 css의 경우 경로가 /fc376dc60222227945af14b78724770fb1dbb699.css?meteor_css_resource=true 이런 식으로 뒤에 ?meteor_css_resource=true  가 붙는다. 정규식만 조금 고쳐주자. location ~* "^/[a-z0-9]{40}\.(css|js)$" { 이 부분을 css 뒤에 개행이 아닌 아무거나 와도 되도록 .*를 추가해주자.  location ~* "^/[a-z0-9]{40}\.(css .* |js)$" { 어 이거 하고 나니 PageSpeed Insights 가 100점이 되넹?