http://caty.caty-sites.net/ 稼働中
とりあえず、こうする。
$ nohup python caty-server.py &$ logout
後はnginxがやってくれる。
#
# caty.caty-sites.net
#
server {
listen 80;
server_name caty.caty-sites.net;
access_log logs/caty.caty-sites.net.access.log main;location / {
proxy_pass http://localhost:8000/;proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}error_page 404 /404.html;
#
error_page 500 502 503 504 /50x.html;
}
もし、8000番が落ちていれば、nginxが 502 Bad Gateway を出す。(nginx設定;error_pageとかは不要だな)
ちゃんとデーモンにするとか、監視(monitの予定)を付けるとかはそのうちやる。