2017-10-25 14 views
0

곧 PHP5.5 -> 5.6 마이그레이션 내가 크롬 콘솔에서이 경고를 발견했습니다 :아파치 충돌 -> 5.6

Resource interpreted as Stylesheet but transferred with MIME type text/html: "https://www.example.com/wp-content/themes/rowling/style.css?ver=4.7.3".

이러한 경고 CSS의 블록 로딩 페이지가 망가져 버린다.

페이지에서 <!DOCTYPE html> 선언을 제거하면 문제가 해결 된 것으로 나타났습니다. 그러나 그것은 무엇에 관한 것입니까? 왜 그런 일이 일어나는거야?

는 문제는 모든 파일 (뿐만 아니라 CSS), 모든 .JPG 존재

는 .MP4 모든 Content-Type: text/html

[email protected]:~$ curl -I https://www.example.com/image.jpg HTTP/1.1 200 OK Date: Thu, 26 Oct 2017 09:17:12 GMT Server: Apache/2.4.29 (Ubuntu) Content-Type: text/html; charset=UTF-8

추신 등의 응답이 온다

아파치 모듈 : mod_mimemod_mime_magic이 활성입니다.

+0

[MIME 형식 text/html로 전송 된 스타일 시트] 가능한 복제본 (https://stackoverflow.com/questions/15969148/stylesheet-transferred-with-mime-type-text-html) – akond

답변

0

좋아, 문제가 해결되었습니다. 내가이 문제를 제거한 후이 줄 SetHandler application/x-httpd-php

을 발견했습니다 /etc/apache2/apache2.conf

는 사라졌다.

모든 답변이 이제 제대로 작동합니다! 마임 타입은 괜찮습니다.