CMS/프레임워크 | Rhymix 2.1 |
---|---|
개발 언어 | PHP 7.4 |
시놀로지 나스에서 도커를 이용하여 서버 구축했는데요
우분투 최신버전 설치 해서 라이믹스도 설치 하려고 하는데요
스삿대로 적용이 안되 있어요. 물론 저대로 설치는 가능 하겠지만, 짧은 주소 이용 하려면 ok 상태로 되어야 하니까요.
vi /etc/nginx/sites-available/default
이 파일을
listen 80 default;
root /var/www/html;
server_name _;
index index.html index.htm index.php;
include snippets/rhymix.conf;
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_pass 127.0.0.1:9000;
include snippets/fastcgi-php.conf;
}
}
이렇게 했구요
그리고 vi /etc/nginx/snippets/rhymix.conf
이건
# block direct access to templates, XML schemas, config files, dotfiles, environment info, etc.
location ~ ^/modules/editor/(skins|styles)/.+\.html$ {
# pass
}
location ~ ^/(addons|common/tpl|files/ruleset|(m\.)?layouts|modules|plugins|themes|widgets|widgetstyles)/.+\.(html|xml)$ {
return 403;
}
location ~ ^/files/(attach|config|cache/store)/.+\.(ph(p|t|ar)?[0-9]?|p?html?|cgi|pl|exe|[aj]spx?|inc|bak)$ {
return 403;
}
location ~ ^/files/(env|member_extra_info/(new_message_flags|point))/ {
return 403;
}
location ~ ^/(\.git|\.ht|\.travis|codeception\.|composer\.|Gruntfile\.js|package\.json|CONTRIBUTING|COPYRIGHT|LICENSE|README) {
return 403;
}
# fix incorrect relative URLs (for legacy support)
location ~ ^/(.+)/(addons|files|layouts|m\.layouts|modules|widgets|widgetstyles)/(.+) {
try_files $uri $uri/ /$2/$3;
}
# fix incorrect minified URLs (for legacy support)
location ~ ^/(.+)\.min\.(css|js)$ {
try_files $uri $uri/ /$1.$2;
}
# rss, blogAPI
rewrite ^/(rss|atom)$ /index.php?module=rss&act=$1 last;
rewrite ^/([a-zA-Z0-9_]+)/(rss|atom|api)$ /index.php?mid=$1&act=$2 last;
# trackback
rewrite ^/([0-9]+)/(.+)/trackback$ /index.php?document_srl=$1&key=$2&act=trackback last;
rewrite ^/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ /index.php?mid=$1&document_srl=$2&key=$3&act=trackback last;
# administrator page
rewrite ^/admin/?$ /index.php?module=admin last;
# document category
rewrite ^/([a-zA-Z0-9_]+)/category/([0-9]+)$ /index.php?mid=$1&category=$2 last;
# document permanent link
rewrite ^/([0-9]+)$ /index.php?document_srl=$1 last;
# mid link
location ~ ^/([a-zA-Z0-9_]+)/?$ {
try_files $uri $uri/ /index.php?mid=$1;
}
# mid + document link
rewrite ^/([a-zA-Z0-9_]+)/([0-9]+)$ /index.php?mid=$1&document_srl=$2 last;
# mid + entry title
rewrite ^/([a-zA-Z0-9_]+)/entry/(.+)$ /index.php?mid=$1&entry=$2 last;
# file download
rewrite ^/files/download/([0-9]+)/([a-zA-Z0-9_-]+)/(.+)$ /index.php?act=procFileOutput&file_srl=$1&file_key=$2&filename=$3 last;
이렇게 했지만 적용이 안되네요.
댓글 4
1. 사용하신 설정 파일은 굉장히 오래된 버전인 것 같습니다. 라이믹스 2.1을 사용하신다면 라이믹스 2.1에 포함된 rewrite 규칙을 사용하세요. common/manual/server_config/rhymix-nginx.conf 에 있습니다.
2. 혹시 /var/www/html에 라이믹스를 바로 설치하지 않고 그 아래에 폴더를 만들어서 설치하셨나요? nginx rewrite 규칙은 경로가 아주 정확해야 합니다. 만약 압축을 풀면서 생긴 폴더가 있다면, 폴더 밖으로 다 옮기세요.
감사합니다. ㅎㅎ 역시 절대 경로가 달라서 안 된거네요
/var/www/html 이게 아니라 /home으로 절대경로 설정했으니 아무리 짧은주소 설정을 해봐도 되지 않을거네요.
default에서 /var/www/html 으로 수정하고 하니 적용이 되네요~
설치시에 설정이 적용되었는데도 그대로인 경우가 간혹 있는데, 모든것을 다 해보셔도 안되시면 속는셈치고 쿠키 비워보시거나 쿠키를 저장하지 않는 브라우저 사생활 보호 모드로 다시 접속해보시는걸 추천드립니다.
저도 시놀로지 나스를 사용해서 이용중인데
도커는 저도 안해봐서 모르겠습니다만
웹스테이션을 사용하는 경우에는 방법을 알고있으니 웹스테이션을 이용하실 경우에는 쪽지 주세요~