Nginx 서버에서 서브디렉토리(subdirectory)에서 index 파일을 못 가져오는 경우
[1] project.eond.com/
[2] project.eond.com/shu
[3] project.eond.com/shu/index.html
실제 index.html 파일이 있는데도, [2]로 접속했을 때 404 오류를 뿜더군요.
nginx 설정파일을 몇십번이나 수정하고 재시작해도 안되길래,
마지막 xe 설정 파일 부분을 빼니 잘 되네요 ㅠㅠ
[1] project.eond.com/
[2] project.eond.com/shu
[3] project.eond.com/shu/index.html
실제 index.html 파일이 있는데도, [2]로 접속했을 때 404 오류를 뿜더군요.
nginx 설정파일을 몇십번이나 수정하고 재시작해도 안되길래,
마지막 xe 설정 파일 부분을 빼니 잘 되네요 ㅠㅠ
location / { root /home/project/www; index index.php index.html; } location /shu { alias /home/project/www/shu; index index.html; }xe_config 파일에 보면 mid link 라는 부분에 이렇게 수정했습니다.
# mid link rewrite ^/shu/ /shu/index.html last; rewrite ^/xe/?$ /xe/index.php?mid=$1 last; rewrite ^/([a-zA-Z0-9_]+)/?$ /index.php?mid=$1 last; #rewrite ^/xe/([a-zA-Z0-9_]+)/?$ /index.php?mid=$1 last;