목차
nginx woff mime type error 설정 해결 방법 Unexpected character in input: 에러
2019/07/25 15:19:07 [error] 25892#24016: *313 FastCGI sent in stderr: "PHP Warning: Unexpected character in input: '' (ASCII=11) state=0 in C:\work\cj_003\dcms-ui\assets\fonts\glyphicons-halflings-regular.woff2 on line 100
PHP Warning: Unexpected character in input: '' (ASCII=16) state=0 in C:\work\cj_003\dcms-ui\assets\fonts\glyphicons-halflings-regular.woff2 on line 100
PHP Warning: Unexpected character in input: '' (ASCII=127) state=0 in C:\work\cj_003\dcms-ui\assets\fonts\glyphicons-halflings-regular.woff2 on line 100
PHP Warning: Unexpected character in input: '' (ASCII=8) state=0 in C:\work\cj_003\dcms-ui\assets\fonts\glyphicons-halflings-regular.woff2 on line 100
PHP Parse error: syntax error, unexpected '�' (T_STRING), expecting ',' or ')' in C:\work\cj_003\dcms-ui\assets\fonts\glyphicons-halflings-regular.woff2 on line 100" while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /assets/fonts/glyphicons-halflings-regular.woff2 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "local-cocos.cjenm.com:9001", referrer: "http://local-cocos.cjenm.com:9001/main/"
2019/07/25 15:19:07 [error] 25892#24016: *313 FastCGI sent in stderr: "PHP Warning: Unexpected character in input: '' (ASCII=11) state=0 in C:\work\cj_003\dcms-ui\assets\fonts\glyphicons-halflings-regular.woff2 on line 100
PHP Warning: Unexpected character in input: '' (ASCII=16) state=0 in C:\work\cj_003\dcms-ui\assets\fonts\glyphicons-halflings-regular.woff2 on line 100
PHP Warning: Unexpected character in input: '' (ASCII=127) state=0 in C:\work\cj_003\dcms-ui\assets\fonts\glyphicons-halflings-regular.woff2 on line 100
PHP Warning: Unexpected character in input: '' (ASCII=8) state=0 in C:\work\cj_003\dcms-ui\assets\fonts\glyphicons-halflings-regular.woff2 on line 100
PHP Parse error: syntax error, unexpected '�' (T_STRING), expecting ',' or ')' in C:\work\cj_003\dcms-ui\assets\fonts\glyphicons-halflings-regular.woff2 on line 100" while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /assets/fonts/glyphicons-halflings-regular.woff2 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "local-cocos.cjenm.com:9001", referrer: "http://local-cocos.cjenm.com:9001/main/"
mime.types 파일에서 font/woff 대신에 application/font-woff 를 써 준다.
font/woff woff; font/woff2 woff2;
application/font-woff woff;
application/font-woff2 woff2;
nginx.conf 파일에서
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 ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { expires 1M; access_log off; add_header Cache-Control "public"; }
woff,woff2를 추가 해준다.
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|woff|woff2|ogv|webm|htc)$ { expires 1M; access_log off; add_header Cache-Control "public"; }
Nginx mime type 설정이 잘못 되면, 크롬이나 오페라 등의 브라우저에서는 큰 티가 안나지만, IE나 엣지 브라우저에서는 CSS가 선택적으로 먹혀서 화면이 흐트러지는 에러가 나온다.
예컨데, input button에 value 값을 마이너스 인덴트로 가리려고 해도, overflow:hidden이 안먹는다던가 해당 클래스가 적용되지 않는 문제가 생긴다.
'Dev > etc' 카테고리의 다른 글
Git 사용법: 원격 저장소, 복제, 커밋, 푸시, 풀, 머지 충돌 해결, remote Repository, clone,commit, push, pull,merge conflict (0) | 2023.08.03 |
---|---|
visual studio code 들여쓰기 fomatter tab 간격 조정 (0) | 2021.07.09 |
JSP에러 : HTTP Status 500 에러메세지- sda7: write failed, user block limit reached (0) | 2020.09.16 |
내도메인.한국 무료 domain주소 티스토리 개인도메인 설정시 CNAME 대신 A레코드 27.0.236.139 dns 시리즈 3 (0) | 2020.03.07 |
유머)작성한 프로그램이 엉망이지만 제대로 동작할 때 (0) | 2020.02.11 |
댓글