- or download this
sudo su -
- or download this
[unit]
name=unit repo
baseurl=https://packages.nginx.org/unit/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
- or download this
yum install -y unit unit-perl
- or download this
{
"type": "perl",
"processes": 5,
"script": "/etc/unit/app.psgi"
}
- or download this
use strict;
use warnings;
...
enable 'ContentLength';
$app;
};
- or download this
service unit start
- or download this
curl -X PUT --data-binary @/etc/unit/start.json --unix-socket /var/run
+/control.unit.sock http://localhost/config/applications/psgiapp
curl -X PUT --data-binary '{"application":"psgiapp"}' --unix-socket /v
+ar/run/control.unit.sock 'http://localhost/config/listeners/*:8000'
- or download this
curl --unix-socket /var/run/control.unit.sock http://localhost/
- or download this
curl -v http://127.0.0.1:8000/