# nginx configuration
location ~ ^/(.*/)?\.(editor|git|ht|jshint|travis) {
return 403;
}
location ~ ^/(codeception(.*)\.yml|composer(.*)\.(json|lock)|package\.json)$ {
return 403;
}
location ~ ^/files/(attach|config|cache/store)/.+\.php$ {
return 403;
}
location ~ ^/files/(env|member_extra_info/(new_message_flags|point))/ {
return 403;
}
location ~ ^/(layouts|m.layouts|files/faceOff)/(.+)\.html$ {
return 403;
}
location /modules/editor/ {
}
location ~ /(skins|m.skins)/(.+)\.html$ {
return 403;
}
location /modules {
rewrite ^(.*)$ /index.php break;
}
location /addons {
rewrite ^(.*)$ /index.php break;
}
location /widgets {
rewrite ^(.*)$ /index.php break;
}
location / {
if ($script_filename !~ "-f"){
rewrite ^/(.+)/files/(member_extra_info|attach|cache|faceOff)/(.*) /files/$2/$3 break;
}
if ($script_filename !~ "-f"){
rewrite ^/(.+)/(files|modules|widgets|widgetstyles|layouts|m.layouts|addons)/(.*) /$2/$3 break;
}
rewrite ^/([a-zA-Z0-9_]+)/(rss|atom|api)$ /index.php?mid=$1&act=$2 break;
rewrite ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)$ /index.php?vid=$1&mid=$2&act=$3 break;
rewrite ^/([0-9]+)/(.+)/trackback$ /index.php?document_srl=$1&key=$2&act=trackback break;
rewrite ^/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ /index.php?mid=$1&document_srl=$2&key=$3&act=trackback break;
rewrite ^/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ /index.php?vid=$1&document_srl=$2&key=$3&act=trackback break;
rewrite ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ /index.php?vid=$1&mid=$2&document_srl=$3&key=$4&act=trackback break;
rewrite ^/([0-9]+)$ /index.php?document_srl=$1 break;
if ($script_filename !~ "-d"){
rewrite ^/([a-zA-Z0-9_]+)/?$ /index.php?mid=$1 break;
}
rewrite ^/([a-zA-Z0-9_]+)/([0-9]+)$ /index.php?mid=$1&document_srl=$2 break;
if ($script_filename !~ "-d"){
rewrite ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/?$ /index.php?vid=$1&mid=$2 break;
}
rewrite ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)$ /index.php?vid=$1&mid=$2&document_srl=$3 break;
rewrite ^/([a-zA-Z0-9_]+)/entry/(.+)$ /index.php?mid=$1&entry=$2 break;
rewrite ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)$ /index.php?vid=$1&mid=$2&entry=$3 break;
if ($script_filename !~ "-f"){
rewrite ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_\.-]+)$ /index.php?act=route&vid=$1&type=$2&identifier=$3 break;
}
}
location /rss {
rewrite ^/(rss|atom)$ /index.php?module=rss&act=$1 break;
}
location /atom {
rewrite ^/(rss|atom)$ /index.php?module=rss&act=$1 break;
}
26.08.26
1
조회 279
26.08.16
1
조회 151
26.06.18
2
조회 761
26.05.22
2
조회 547
26.05.21
2
조회 554
26.05.20
2
조회 165
26.05.17
13
조회 1092
26.05.16
2
조회 570
26.05.15
0
조회 582
26.04.24
2
조회 763
26.03.24
2
조회 249
26.03.09
0
조회 410
26.02.13
2
조회 911
26.01.30
4
조회 1115
26.01.22
0
조회 762
26.01.11
1
조회 887
26.01.09
7
조회 815
25.12.06
1
조회 1369
25.12.06
0
조회 1646
25.09.17
1
조회 218
댓글 2
변경하지 않는다고 XE 1.8.37에서 딱히 문제가 생기는 건 아니고요, 일부 문제를 일으킬 소지가 있는 경로에 대한 접근을 제한한 것 뿐입니다.
지금 XE에서 배포하는 rewrite 규칙들도 부족한 점이 많으므로 nginx용으로 만들 때 굳이 100% 동일하게 번역할 필요는 없습니다. if 사용은 자제하고, 접근을 제한하면 될 것을 불필요하게 index.php로 rewrite하는 것도 피하세요. 특히 modules, addons, widgets 등을 일괄적으로 막는 것은 문제가 발생할 소지가 많아 보입니다.
라이믹스 rewrite 규칙을 참고하세요.