미니톡포럼

미니톡을 이용하는데 있어 의견이나 궁금한점이 있다면 미니톡포럼을 이용하여 보세요.

문의게시판

문의사항이 있다면 누구나 자유롭게 질문하고 답변할 수 있습니다.

Q미니톡 클라이언트 설치 - nginx 서버환경에서 REWRITE 규칙 적용하기 ?

  • 현재 7.3.4은 최신버전입니다.
  • PHP 최소요구사항(5.5.0)을 만족합니다. (현재버전 : 7.4.27)
  • MySQL 최소요구사항(5.0.0)을 만족합니다. (현재버전 : 70427)
  • PHP의 CURL 모듈이 설치되어 있습니다.
  • PHP의 openssl/mcrypt encrypt 모듈이 설치되어 있습니다.
  • 사용중인 웹서버의 rewrite 설정을 확인할 수 없습니다. 매뉴얼을 참고하여 rewrite 설정을 완료하여 주십시오.
  • attachments폴더의 퍼미션이 정상적으로 설정되었습니다.
  • configs폴더의 퍼미션이 정상적으로 설정되었습니다.
  • 이전설치파일 key.config.php 이 존재하지 않습니다.
  • 이전설치파일 db.config.php 이 존재하지 않습니다.
  • 환경설정파일 Minitalk.preset.php 이 존재하지 않습니다.


===========================================================================================================

(가) 미니톡 클라이언트 설치 위치


[root@host minitalk]# pwd

/opt/html/minitalk


===========================================================================================================

(나) nginx 루트 폴더 

/opt/html

===========================================================================================================

[root@host conf.d]# cat choicecoin.net.conf


server {

    client_max_body_size 0;

    server_name choicecoin.net www.choicecoin.net;


    root /opt/html;

    index index.php index.html index.htm;


    location /minitalk {

            if (!-e $request_filename) {

                rewrite ^/admin/([^\/]+)/?$ /admin/index.php?menu=$1 break;

                }


                rewrite ^/api/index.php$ /api/index.php?$query_string last;

                rewrite ^/api/([^\/]+)$ /api/index.php?api=$1&idx=$2&$query_string last;

                rewrite ^/api/([^\/]+)/?([^\/]+)?$ /api/index.php?api=$1&idx=$2&$query_string last;

                rewrite ^/process/([^\/]+)$ /process/index.php?action=$1&$query_string last;

                rewrite ^/process/([^\/]+)/?(.*?)?$ /process/index.php?action=$1&extras=$2&$query_string last;

        }


    location ~* \.(eot|otf|ttf|woff|woff2)$ {

                add_header Access-Control-Allow-Origin *;

                }


    location / {

            try_files $uri $uri/ =404;

        }

    error_page 404 /404.html;

    error_page 500 502 503 504 /50x.html;


    location = /50x.html {

        root /usr/share/nginx/html;

        }


    location ~ \.php$ {

        try_files $uri =404;

        fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;

        fastcgi_index index.php;

        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        include fastcgi_params;

        }


    listen 443 ssl; # managed by Certbot

    ssl_certificate /etc/letsencrypt/live/choicecoin.net/fullchain.pem; # managed by Certbot

    ssl_certificate_key /etc/letsencrypt/live/choicecoin.net/privkey.pem; # managed by Certbot

    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot

    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


    add_header Strict-Transport-Security         "max-age=15768000; includeSubDomains;";

    add_header X-Frame-Options                      "SAMEORIGIN";

    add_header X-Content-Type-Options               "nosniff";

    add_header X-XSS-Protection                     "1; mode=block";

    add_header X-Robots-Tag                         "none";

    add_header X-Download-Options                   "noopen";

    add_header X-Permitted-Cross-Domain-Policies    "none";


}


server {

    if ($host = www.choicecoin.net) {

        return 301 https://$host$request_uri;

    } # managed by Certbot



    if ($host = choicecoin.net) {

        return 301 https://$host$request_uri;

    } # managed by Certbot


    listen 80;

    server_name choicecoin.net www.choicecoin.net;

    return 404; # managed by Certbot

}

익명-1R246P
LV.1

A 답변

안녕하세요.

REWRITE 규칙 적용하기 매뉴얼에 따라 rewrite 를 정상적으로 nginx 서버에 설정하였음에도

설치페이지에서 확인이 불가능하다고 나오는 경우


https://yourdomain.com/minitalk/process/check 처럼 미니톡이 설치된 폴더뒤에 /process/check 주소로 접속하였을 경우

{
"success": true
}

위와 같은 메시지가 나오는지 확인해주시기 바랍니다.


해당 메시지가 나오지 않는다면, 서버상의 다른 설정때문에 정상적으로 rewrite 가 되지 않고 있는 것이며, 이는 해당 페이지를 직접 보거나 서버의 다른설정을 보아야지만 알 수 있을 것 같습니다.

알쯔
LV.16