nginx 서버에서 게시판 카테고리를 못 불러오는 문제점
Ubuntu 16.04 LTS 웹서버 세팅방법 (Nginx + PHP7-FPM + MariaDB)
https://blog.lael.be/post/2600#comment-2528
라엘님 블로그에서 엔진엑스 세팅법을 보고 따라했는데, 다 되는데,
게시판 분류가 표시가 안되더군요.
https://xetown.com/qna/471221#comment_510539
제 문제도 이거랑 똑같았죠
원인은,
# Block .php file inside upload folder. uploads(wp), files(drupal, xe), data(gnuboard). # location ~* /(?:uploads|files|data)/.*\.php$ { # deny all; # }
https://xetown.com/qna/387882
이 부분이었습니다.
구글에서도 '분류 files/cache/document_category/' 라고 검색해보시면 안된다는 분들이 많으시고,
https://github.com/xpressengine/xe-core/issues/1349
https://github.com/xpressengine/xe-core/issues/1124
xe 코어 이슈에도 있고 한데,
꼭 리스타트 해주세요.
https://xe1.xpressengine.com/qna/22627713
안그럼 이렇게 글 남기게 될;;
그 밖에 설정하신 분도 계신데
http://forhim.tistory.com/1237
conf 파일이 중요하네요 ㅠ
저는 안된다고 php-xml 모듈이며, php-xml-parser 모듈이며 다 설치해봤는데
문제는 conf 파일이었네요.
nginx rewrite 설정도 다양합니다.
https://github.com/xpressengine/xe-core/wiki/Nginx-rewite-%EC%84%A4%EC%A0%95%ED%95%98%EA%B8%B0
라이믹스용
https://github.com/rhymix/rhymix/blob/ba8ff52904b8e59ca92c82cbdf3c3647ddf15786/common/manual/server_config/rhymix-nginx.conf

댓글 4
규칙을 세분화 해봐야겠네요.
전 적용해서 쓰고 있습니다만,
다른분들을 위해서 정보는 이래서 소중한거네요...^^;;
location ~* /(?:uploads|files|data)/.*\.php$ { 이부분은 해당 폴더에서 php 파일의 구동을 막는건데 저렇게 주석처리해서 막으면 보안에 문제가 생기지 않을까요?
/document_category/숫자.xml.php 파일 열어보니까 단독 실행 할 수 있게 예외 처리되어있네요.
문제 사항이 해결된 코드는 짰는데, 더 깔끔한 작성이 있나 생각하고 있습니다.
[code bash]
# Allow (xe, rhymix) category xml file.
location ~* /files/cache/(document_category|menu)/.*\.xml\.php$ {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass unix:/run/php/laelbe.sock;
fastcgi_index index.php;
include fastcgi_params;
}
[/code]
https://xetown.com/qna/471221#comment_510900
location ~ ^/files/(attach|config)/.+\.php$ {
deny all;
}
여긴 이렇게 하셨네요^^;