nginx / unit

NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
https://unit.nginx.org
Apache License 2.0
5.37k stars 323 forks source link

Couldn't connect to server after install on Ubuntu #1290

Closed andreybolonin closed 4 months ago

andreybolonin commented 4 months ago

● unit.service - NGINX Unit
     Loaded: loaded (/lib/systemd/system/unit.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2024-05-25 10:37:07 MSK; 8s ago
    Process: 1423843 ExecStart=/usr/sbin/unitd $DAEMON_ARGS (code=exited, status=0/SUCCESS)
   Main PID: 1423845 (unitd)
      Tasks: 3 (limit: 2220)
     Memory: 3.5M
        CPU: 19ms
     CGroup: /system.slice/unit.service
             ├─1423845 "unit: main v1.32.1 [/usr/sbin/unitd]"
             ├─1423847 "unit: controller"
             └─1423848 "unit: router" "" "" ""

May 25 10:37:07 1632481-cw99681.twc1.net systemd[1]: Starting NGINX Unit...
May 25 10:37:07 1632481-cw99681.twc1.net unitd[1423843]: 2024/05/25 10:37:07 [info] 1423843#1423843 unit 1.32.1 started
May 25 10:37:07 1632481-cw99681.twc1.net systemd[1]: unit.service: Can't open PID file /run/unit.pid (yet?) after start: Operation not permitted
May 25 10:37:07 1632481-cw99681.twc1.net systemd[1]: Started NGINX Unit.

root@1632481-cw99681:/var/www/podex# sudo curl -X PUT --data-binary @nginx-unit.json --unix-socket /path/to/control.unit.sock http://localhost/config/
curl: (7) Couldn't connect to server`

Any ideas why?
andreybolonin commented 4 months ago
The PHP module for NGINX Unit has been installed.

To check out the sample app, run these commands:

 sudo service unit restart
 cd /usr/share/doc/unit-php/examples
 sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config
 curl http://localhost:8300/