- cpanm Plack
- PSGIの実装
- cpanm Starman / cpanm Starlet
- PSGI対応サーバー
- hello world
- nginxでreverse proxy
- sudo vim /usr/local/nginx/conf/nginx.conf修正
worker_processes 1;
events {
worker_connections 1024;
}
http {
access_log logs/access.log main;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://localhost:5000;
}
}
}
- これでポート5000で立てたHelloWorldに80でアクセスできる
- スタート
start_server --port 5000 -- plackup -s Starlet -L Shotgun app.psgi