웹마스터 팁

우분투 12.04과 Previrtu님의 NPM 자동 설치 스크립트, XE코어 1.7.3.4를 기준으로 설명합니다.

먼저 NPM을 깔아주세요. - http://bxstorage.tistory.com/46

 

설치가 끝나셨다면 /etc/nginx 에 첨부된 php 파일과 xe 파일을 붙여넣어주세요.

(php 파일은 php5-fpm을 사용하기 위한 파일, xe 파일은 .htaccess 파일을 nginx 용으로 변환해주는 사이트를 통해 변환한 XE RewriteRule 입니다.)

 

그 다음 conf.d -> localhost를 편집해야하는데

 

(실제 제 서버의 localhost 파일의 일부입니다.)

server {

listen 80 default_server;
 
 root /home/www/sjwmcshome; (웹페이지가 있는 절대경로 입력)
 index index.php index.html index.htm; 
 server_name sjwmcs.kr; (가상호스트 도메인 입력, 가상호스트 사용 안할거면 그냥 127.0.0.1 입력하세요.
 
 include php; (아까 /etc/nginx 에 붙여놓은 php 파일을 include 하는 명령입니다.)
# Using php
 include xe;  (아까 /etc/nginx 에 붙여놓은 xe 파일을 include 하는 명령입니다. 이걸 해야 짧은주소를 쓸수있습니다.)
# Using XE Rewrite
        error_page 404 /404.html; 이 두개는 제 개인적인 설정이다 보니 생략하셔도 되요.
        error_page 403 /403.html;
# ErrorPage

}

server {
# SJWMCS OfficialHome - SSL
        listen       443;
        server_name  sjwmcs.kr;
# SSL Setings  (역시 이부분은 SSL 관련 설정입니다. 필요하실 분이 한분쯤은 계실지도 몰라서 말입니다 ㅎ)
        ssl                  on;
        ssl_certificate      /home/www/sslcert/sjwmcskr/ssl-unified.crt;
        ssl_certificate_key  /home/www/sslcert/sjwmcskr/ssl.key;

        ssl_session_timeout  5m;

        ssl_protocols  SSLv2 SSLv3 TLSv1;
        ssl_ciphers  HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers   on;

        include php; (여기서도 php 를 쓰기 위해 include를 하고있죠)
# Using php
        include xe; (역시 Rewrite를 위해서..)
# Using XE Rewrite
        root   /home/www/sjwmcshome; (
        index  index.php index.html index.htm;

        error_page 404 /404.html;
        error_page 403 /403.html;
# ErrorPage
    }


 

설정이 끝나셧다면 XE가 MariaDB를 지원하도록 설정을 해주셔야 합니다.

http://hosting.sqs.kr/tip/83488 여기를 참고하셔서 변경을 해주시면 됩니다.

 

그리고 DB 만드시고 설치하시면 대망의 nginx에 깔린 Rewrite 잘되는 XE를 보실 수 있습니다.

 

PS : apache에 깔린 XE를 이전시 OEZ님의 SSL 애드온이 깔려있으면 nginx 이전시 에러를 뿜어줍니다.

(http://www.xpressengine.com/index.php?mid=download&category_srl=18322925&parent_srl=18322917&package_srl=21439563)

 

제목 글쓴이 날짜

등록된 글이 없습니다.