Skip to content

nginx 셋팅 트러블 슈팅

Hoeeeeeh edited this page Dec 5, 2024 · 1 revision

https://chunsubyeong.tistory.com/136

  • Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.

⇒ nginx 에서 정적 파일을 서빙할 때, MIME 타입을 설정해야한다.

nginx.conf

http {
    include /etc/nginx/mime.types;
    
    # 기본 MIME 타입 설정 (생략할 수도 있음)
    default_type application/octet-stream;

    # MIME 타입 추가 확인
    types {
        application/javascript js;
        text/css css;
    }

    # 기타 설정...
}

LiBoo

공통

민지

영길

준서

지수

창현

데일리 스크럼

회의록

발표

일기장

Clone this wiki locally