Help for this page

Select Code to Download


  1. or download this
    sudo su -
    
  2. or download this
    [unit]
    name=unit repo
    baseurl=https://packages.nginx.org/unit/centos/$releasever/$basearch/
    gpgcheck=0
    enabled=1
    
  3. or download this
    yum install -y unit unit-perl
    
  4. or download this
    {
       "type": "perl",
       "processes": 5,
       "script": "/etc/unit/app.psgi"
    }
    
  5. or download this
    use strict;
    use warnings;
    ...
        enable 'ContentLength';
        $app;
    };
    
  6. or download this
    service unit start
    
  7. 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'
    
  8. or download this
    curl --unix-socket /var/run/control.unit.sock http://localhost/
    
  9. or download this
    curl -v http://127.0.0.1:8000/