- Install cpanminus:
curl -L http://cpanmin.us | perl - --sudo App::cpanminus`
- Install Perl modules:
cpanm Task::Plack XMLRPC::Transport::HTTP::Plack Starman
- Place in
/etc/init.d
mt-starman
:
wget -P /etc/init.d https://raw.github.com/saahov/mt-starman-daemon/master/debian/mt-starman
- Change permissions:
chmod +x /etc/init.d/mt-starman
-
Change variables (
DIR
,SCRIPT
,USER
,GROUP
,WORKERS
) in/etc/init.d/mt-starman
. -
Add
mt-starman
to Debian autostart:
update-rc.d mt-starman defaults
If you use Debian Squeeze (and above):
insserv mt-starman
- Add to
nginx.conf
(http
section):
upstream starman {
server 127.0.0.1:50000;
}
- Add to nginx site config (
server
section):
location /cgi-bin/mt/ {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://starman;
}
- Add to
mt-config.cgi
:
PIDFilePath /var/run/mt.pid
- Also you can add this in
mt-config.cgi
(for beautiful url's without extensions):
AdminScript app
CommentScript comments
TrackbackScript trackbacks
SearchScript search
XMLRPCScript xmlrpc
AtomScript atom
UpgradeScript upgrade
Run this command to start Starman and restart nginx:
/etc/init.d/mt-starman start && /etc/init.d/nginx restart