CMS/프레임워크 | Rhymix 2.0 |
---|---|
개발 언어 | PHP 7.4 |
안녕하세요
아래는 썸씽모듈 짧은주소 설정 방법인데요
https://xe-something.com/board_support/201
각 Nginx XE-Rewrite conf 설정 파일 편집 합니다.
각 서버의 xe-rewrite을 담당하는 부분 아래에 다음과 같이 룰을 추가해 주세요.
rewrite ^/@([a-zA-Z0-9가-힇_]+)/?$ /index.php?mid=testmid&act=dispSomethingProfileView&smember=$1 last;
위와 같이 testmid 쪽을 넣으려고
rhymix-nginx.conf 쪽을 열어봤는데 위와 같은 부분이 없어서요 ㅜ
https://github.com/rhymix/rhymix/blob/master/common/manual/server_config/rhymix-nginx.conf
혹시 사용자분들중에 XE가 아닌 라이믹스 rhymix-nginx.conf 에서 짧은주소 적용하신분 계실까요?
이부분이 막혀서 헤메고 있어서요 ㅜㅜ
웹지기님 처럼 타임라인 모듈에서 회원별 개인 페이지는 만들수 있는 실력이 아직 안되서
썸씽모듈을 이용해보려고 하는데 여기서 막히네요 ㅜㅜ
Maxter
Lv. 6
반가워요~
댓글 18
저 코드가 있으면 원래 안되고 해당 코드를 기존 conf에서 추가하라는 것입니다.
testmid부분을 님이 사용하시는 섬싱모듈의 mid으로 수정하라는 의미입니다.
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;
}
# fix download URL when other directives for static files are present
location ~ ^/files/download/ {
try_files $uri $uri/ /index.php$is_args$args;
}
# all other short URLs
location / {
try_files $uri $uri/ /index.php$is_args$args;
위의
rhymix-nginx.conf 내용중에서
어느부분에 넣어야 할지 모르겠어서요
파일내용에 index.php?mid= <---- 이런 부분이 안보여서요 ㅜㅜ
각서버의 xe-rewrite 담당하는 파일 /etc/nginx/ 안에 있는 라이믹스 관련 rewrite 규칙을 넣은 conf폴더 안에 어디에든지 아래의 코드내용을 적으라는 글입니다
어디아래에 어디어디에 넣으라 testmid 아래에 넣어라 이런글 없는 것 같은데.. 잘못 착각하시고 계신것 같습니다.
testmid역시 "예시"이기 때문에 본인이 썸싱모듈을 만들었을때 생성한 mid값을 바꾸셔야 하고요..
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;
}
# fix download URL when other directives for static files are present
location ~ ^/files/download/ {
try_files $uri $uri/ /index.php$is_args$args;
}
# all other short URLs
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
rewrite ^/@([a-zA-Z0-9가-힇_]+)/?$ /index.php?mid=profile&act=dispSomethingProfileView&smember=$1 last;
맨 아래에 위와 같이 추가를 해봤는데 개인주소가 먹히지는 않아서요 서버를 재부팅 해봐야할까요?
여기서 리로드가 되지 않는다면 구문에 에러가 있는것이겠지요..
include rhymix-nginx.conf;
rewrite ^/@([a-zA-Z0-9가-힇_]+)/?$ /index.php?mid=profile&act=dispSomethingProfileView&smember=$1 last;
이런식으로 라이믹스에 연결된 .conf 파일에 위와 같이 삽입 후 재부팅 했는데 적용이 안되네요 ㅜㅜ
... 답변 감사합니다..
뭐 해당 부분을 찾아보긴하겟지만..-_- 실제로 될지는 모르겠네요.
굳이 @ 없어도 주소/id 또는 닉네임 등으로 개인회원페이지가 접속되면 보다 활용도가 높아질수있어서요 ㅜ
답변 감사합니다 ㅜㅜ
rewrite ^/@([a-zA-Z0-9가-힇_]+)/?$ /index.php?mid=profile&act=dispSomethingProfileView&smember=$1 last;
}
위와 같이 넣어봤는데도 안되네요 ㅜㅜ
해결하신분 계시면 도움 좀 부탁드립니다
안된다는게 뭐가 안된다는 건지 명확하진 않지만 저는 라이믹스에서 이상 없이 동작했습니다.
라이믹스용 rewrite include 되는 바로 아랫줄에 추가로 구문이 들어가 있습니다.
라이믹스에서 제공하는 라이믹스용 rewrite 파일은 건드리지 않았습니다.
별도로 구문을 추가한 것이죠.
include 라이믹스.conf
rewrite ^/@([a-zA-Z0-9가-힇_]+)/?$ /index.php?mid=testmid&act=dispSomethingProfileView&smember=$1 last;
rewrite ^/@([a-zA-Z0-9가-힇_]+)/?$ /index.php?mid=profile&act=dispSomethingProfileView&smember=$1 last;
연결되는 conf 파일 하나에 위와 같이 하고 재시작 했는데 적용이 안되네요... 훔..
연결된 도메인 1개에만 적용하는게 아닌 서버에 연결된 도메인별 파일마다 다해야하는지요?
사이트마다 nginx 설정은 개별적으로 하기 때문에 하고 적용하고 싶은 사이트에만 적용하면 됩니다.
뭐가 안된다는건지 잘 모르겠지만 저는 잘되고 다른 분도 잘 됩니다.
썸씽모듈 설정에서 설정하신 형식으로 url을 입력해서 테스트하신 건지 등 검토해 보셔야 겠네요.
위 이슈를 확인해주세요.
짧은주소로 접속 후 긴주소로 redirect 되는 방식으로 일단 연결 성공했습니다! ㅜㅜ