사용자 도구

사이트 도구


ghost:install

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
ghost:install [2015/03/23 04:51] – [설정 파일] changwooghost:install [2015/03/23 05:06] (현재) – [proxy 모듈로 아파치에서 연결] changwoo
줄 82: 줄 82:
   * 접속이 된다면 ''<nowiki>http://<server-ip>:2370/ghost</nowiki>''로 접속해서 관리자를 생성합니다.   * 접속이 된다면 ''<nowiki>http://<server-ip>:2370/ghost</nowiki>''로 접속해서 관리자를 생성합니다.
 ===== supervisor를 사용한 자동 시작 ===== ===== supervisor를 사용한 자동 시작 =====
 +아무래도 서버가 실행될 때 ghost도 자동으로 실행되는 것이 바람직합니다. ''npm start --production'' 명령을 매번 입력할 수는 없습니다. 그러므로 [[http://supervisord.org/ |supervisor]]를 이용해 자동화합니다.
  
 +<code>
 +# sudo apt-get install supervisor
 +# service supervisor start
 +# vi /etc/supervisor/conf.d/ghost.conf
 +</code>
 +
 +<code>
 +[program:ghost]
 +command = node /media/storage/nodejs-deploy/ghost/index.js
 +directory = /media/storage/nodejs-deploy/ghost
 +user = ghost
 +autostart = true
 +autorestart = true
 +stdout_logfile = /var/log/supervisor/ghost.log
 +stderr_logfile = /var/log/supervisor/ghost_err.log
 +environment = NODE_ENV="production"
 +</code>
 +
 +''supervisorctl start ghost'' 명령으로 ghost를 실행해 봅니다.
 ===== proxy 모듈로 아파치에서 연결 ===== ===== proxy 모듈로 아파치에서 연결 =====
 +<code>
 +# apt-get install libapache2-mod-proxy-html libxml2-dev
 +# a2enmod proxy
 +# a2enmod proxy_balancer
 +# a2enmod proxy_http
 +# a2enmod proxy_html
 +# a2enmod xml2enc
 +# a2enmod deflate
 +# a2enmod headers
 +# a2enmod proxy_connect
 +# a2enmod proxy_ajp
 +</code>
 +
 +아파치 가상호스트 설정
 +<code>
 +<VirtualHost *:80>
 + ProxyPreserveHost On
 + ProxyPass / http://0.0.0.0:2370/
 + ProxyPassReverse / http://0.0.0.0:2370/
 + ServerName ghost.changwoo.pe.kr
 +</VirtualHost>
 +</code>
 +
 +혹시 작동되지 않는다면 도메인과 포트를 다시 한 번 잘 체크하여 봅니다. 기본 포트는 2368이지만 이 예에서는 2370으로 변경했음을 주지하세요.
  
 ===== 출처 및 참고 사이트 ===== ===== 출처 및 참고 사이트 =====
 +  * [[http://support.ghost.org/getting-started/ | Getting Started with Ghost]]
 +  * [[http://support.ghost.org/deploying-ghost  | Deploing Ghost]]
 +  * [[http://support.ghost.org/config | Configuring Ghost]]
 +  * [[https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension | How To Use Apache HTTP Server As Reverse-Proxy Using mod_proxy Extension]]
ghost/install.1427086272.txt.gz · 마지막으로 수정됨: 2015/03/23 04:51 저자 changwoo

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki