[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6520":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":16,"starSnapshotCount":16,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},6520,"unit","nginx\u002Funit","nginx","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:\u002F\u002Funit.nginx.org",null,"C",5558,371,5,257,0,1,63.81,"Apache License 2.0",true,false,"master",[],"2026-06-12 04:00:29","# NGINX Unit\n\n[![Project Status: Unsupported – The project has reached a stable, usable state, but the author(s) have ceased all work on it. A new maintainer is desired.](https:\u002F\u002Fwww.repostatus.org\u002Fbadges\u002Flatest\u002Funsupported.svg)](https:\u002F\u002Fwww.repostatus.org\u002F#unsupported)\n\n## Note: This repository has been archived. There will likely be no further development at this repo, and security vulnerabilities may be unaddressed.\n## The repo may be cloned and used under its current license.\n\n\n## Universal Web App Server\n\n![NGINX Unit Logo](docs\u002Funitlogo.svg)\n\nNGINX Unit is a lightweight and versatile open-source server that has\ntwo primary capabilities:\n\n- serves static media assets,\n- runs application code in eight languages.\n\nUnit compresses several layers of the modern application stack into a potent,\ncoherent solution with a focus on performance, low latency, and scalability. It\nis intended as a universal building block for any web architecture, regardless\nof its complexity, from enterprise-scale deployments to your pet's homepage.\n\nIts native [RESTful JSON API](#openapi-specification) enables dynamic\nupdates with zero interruptions and flexible configuration, while its\nout-of-the-box productivity reliably scales to production-grade workloads. We\nachieve that with a complex, asynchronous, multithreading architecture\ncomprising multiple processes to ensure security and robustness while getting\nthe most out of today's computing platforms.\n\n## Installation\n\n### macOS\n\nRun the following command to install both `unitd` (the Unit daemon) and\n`unitctl` (the control tool).\n\n``` console\n$ brew install nginx\u002Funit\u002Funit\n```\n\nFor details and available language packages, see the\n[docs](https:\u002F\u002Funit.nginx.org\u002Finstallation\u002F#homebrew).\n\n### Docker\n\n``` console\n$ docker pull unit:\u003CTAG>\n$ mkdir \u002Ftmp\u002Funit-control # customize as needed.\n$ docker run -d \\\n      --mount type=bind,src=\u002Ftmp\u002Funit-control,dst=\u002Fvar\u002Frun \\\n      --mount type=bind,src=.,dst=\u002Fwww \\\n      --network host \\\n      unit\n```\n\nFor a description of image tags, see the\n[docs](https:\u002F\u002Funit.nginx.org\u002Finstallation\u002F#docker-images).\n\nWARNING: The latest image tag may not provide support for specific languages\nmodules, *do* check the available image tags from the link above before\npulling your image.\n\nYour current working directory will now be mounted to the Unit image at `\u002Fwww`.\nYou can reach its socket at `\u002Ftmp\u002Funit-control\u002Fcontrol.unit.sock` assuming no\nfurther customizations have been made.\n\n### Debian, Ubuntu, Amazon Linux, Fedora, Red Hat\n\nThis helper script configures the correct package repositories for system.\n``` console\n$ wget https:\u002F\u002Fraw.githubusercontent.com\u002Fnginx\u002Funit\u002Fmaster\u002Ftools\u002Fsetup-unit && chmod +x setup-unit\n# .\u002Fsetup-unit repo-config\n```\n\nDebian derivatives:\n``` console\n# apt install unit\n```\n\nFedora derivatives:\n``` console\n# yum install unit\n```\n\nFor details and available language packages, see the\n[docs](https:\u002F\u002Funit.nginx.org\u002Finstallation\u002F#official-packages).\n\n## Getting Started with `unitctl`\n\n[`unitctl`](tools\u002FREADME.md) streamlines the management of NGINX Unit processes\nthrough an easy-to-use command line interface. To get started with `unitctl`,\ndownload it from the\n[official GitHub releases](https:\u002F\u002Fgithub.com\u002Fnginx\u002Funit\u002Freleases)\nor [Homebrew](#macos).\n\n### Installation\n\n> [!NOTE]\n> If you installed Unit with [Homebrew](#macos), you can skip this step\n> as `unitctl` is included by default.\n\nDownload the appropriate `unitctl` binary for your system from the\n[NGINX Unit releases](https:\u002F\u002Fgithub.com\u002Fnginx\u002Funit\u002Freleases\u002F).\n\n``` console\n$ tar xzvf unitctl-master-x86_64-unknown-linux-gnu.tar.gz\n# mv unitctl \u002Fusr\u002Flocal\u002Fbin\u002F\n```\n\n\n## Launch Unit using Docker\nIf you have [Docker installed](https:\u002F\u002Fdocs.docker.com\u002Fengine\u002Finstall\u002F) on\nyour machine, and then you can effortlessly spin up one of\n[Unit's official Docker images](https:\u002F\u002Fhub.docker.com\u002F_\u002Funit)\nalongside your application.\n\n> [!TIP]\n> How-to and configuration guides are available on\n[unit.nginx.org](https:\u002F\u002Funit.nginx.org\u002Fhowto\u002F) for web application frameworks\nbuilt with Python, PHP, WebAssembly, Node.js, Ruby, and more.\n\nHere's an example using the `unit:python` Docker image:\n``` console\n$ unitctl instances new 127.0.0.1:8001 \u002Fpath\u002Fto\u002Fapp 'unit:python'\n```\n\n`\u002Fpath\u002Fto\u002Fapp` will mount to `\u002Fwww` in the Docker filesystem.\n\nSave this to `\u002Fpath\u002Fto\u002Fapp\u002Fwsgi.py`:\n```python\ndef application(environ, start_response):\n    start_response(\"200 OK\", [(\"Content-Type\", \"text\u002Fplain\")])\n    return (b\"Hello, Python on Unit!\")\n```\n\nYou can then interactively edit the currently active configuration:\n``` console\n$ unitctl edit\n```\n```jsonc\n{\n  \"listeners\": {\n    \"*:8000\": {\n      \u002F\u002F Point listener to new application\n      \"pass\": \"applications\u002Fpython\"\n    }\n  },\n\n  \u002F\u002F Add an application definition\n  \"applications\": {\n    \"python\": {\n        \"type\": \"python\",\n        \"path\": \"\u002Fwww\u002F\",\n        \"module\": \"wsgi\"\n    }\n  }\n}\n```\nValid configurations will be applied upon save and close.\n\n``` console\n$ curl localhost:8000\n\nHello, Python on Unit!\n```\nMore Python configuration examples can be found in the\n[Unit docs](https:\u002F\u002Funit.nginx.org\u002Fhowto\u002Fsamples\u002F#python).\n\n## Hello World with PHP and curl\n\nUnit runs apps in a\n[variety of languages](https:\u002F\u002Funit.nginx.org\u002Fhowto\u002Fsamples\u002F).\nLet's explore the configuration of a simple PHP app on Unit with `curl`.\n\nSuppose you saved a PHP script as `\u002Fwww\u002Fhelloworld\u002Findex.php`:\n``` php\n\u003C?php echo \"Hello, PHP on Unit!\"; ?>\n```\n\nTo run it on Unit with the `unit-php` module installed, first set up an\napplication object. Let's store our first config snippet in a file called\n`config.json`:\n\n``` json\n{\n    \"helloworld\": {\n        \"type\": \"php\",\n        \"root\": \"\u002Fwww\u002Fhelloworld\u002F\"\n    }\n}\n```\n\nSaving it as a file isn't necessary, but can come in handy with larger objects.\n\nNow, `PUT` it into the `\u002Fconfig\u002Fapplications` section of Unit's control API,\nusually available by default via a Unix domain socket:\n\n``` console\n# curl -X PUT --data-binary @config.json --unix-socket  \\\n       \u002Fpath\u002Fto\u002Fcontrol.unit.sock http:\u002F\u002Flocalhost\u002Fconfig\u002Fapplications\n```\n``` json\n{\n\t\"success\": \"Reconfiguration done.\"\n}\n```\n\nNext, reference the app from a listener object in the `\u002Fconfig\u002Flisteners`\nsection of the API.  This time, we pass the config snippet straight from the\ncommand line:\n\n``` console\n# curl -X PUT -d '{\"127.0.0.1:8080\": {\"pass\": \"applications\u002Fhelloworld\"}}'  \\\n       --unix-socket \u002Fpath\u002Fto\u002Fcontrol.unit.sock http:\u002F\u002Flocalhost\u002Fconfig\u002Flisteners\n```\n``` json\n{\n    \"success\": \"Reconfiguration done.\"\n}\n```\n\nNow Unit accepts requests at the specified IP and port, passing them to the\napplication process. Your app works!\n\n``` console\n$ curl 127.0.0.1:8080\n\n      Hello, PHP on Unit!\n```\n\nFinally, query the entire `\u002Fconfig` section of the control API:\n\n``` console\n# curl --unix-socket \u002Fpath\u002Fto\u002Fcontrol.unit.sock http:\u002F\u002Flocalhost\u002Fconfig\u002F\n```\n\nUnit's output should contain both snippets, neatly organized:\n\n``` json\n{\n    \"listeners\": {\n        \"127.0.0.1:8080\": {\n            \"pass\": \"applications\u002Fhelloworld\"\n        }\n    },\n\n    \"applications\": {\n        \"helloworld\": {\n            \"type\": \"php\",\n            \"root\": \"\u002Fwww\u002Fhelloworld\u002F\"\n        }\n    }\n}\n```\n\n## WebAssembly\nUnit supports running WebAssembly Components (WASI 0.2).\nFor more information see the\n[Unit Configuration Docs](https:\u002F\u002Funit.nginx.org\u002Fconfiguration\u002F#configuration-wasm).\n\n## OpenAPI Specification\n\nOur [OpenAPI specification](docs\u002Funit-openapi.yaml) aims to simplify\nconfiguring and integrating NGINX Unit deployments and provide an authoritative\nsource of knowledge about the control API.\n\n## Community\n\n- The go-to place to start asking questions and share your thoughts is\n [GitHub Discussions](https:\u002F\u002Fgithub.com\u002Fnginx\u002Funit\u002Fdiscussions).\n\n- Our [GitHub issues page](https:\u002F\u002Fgithub.com\u002Fnginx\u002Funit\u002Fissues) offers\n  space for a more technical discussion at your own pace.\n\n- The [project map](https:\u002F\u002Fgithub.com\u002Forgs\u002Fnginx\u002Fprojects\u002F1) on\n  GitHub sheds some light on our current work and plans for the future.\n\n- Our [official website](https:\u002F\u002Funit.nginx.org\u002F) may provide answers\n  not easily found otherwise.\n\n- Get involved with the project by contributing! See the\n  [contributing guide](CONTRIBUTING.md) for details.\n\n- To reach the team directly, subscribe to the\n  [mailing list](https:\u002F\u002Fmailman.nginx.org\u002Fmailman\u002Flistinfo\u002Funit).\n\n- For security issues, [email us](mailto:security-alert@nginx.org),\n  mentioning NGINX Unit in the subject and following the [CVSS\n  v3.1](https:\u002F\u002Fwww.first.org\u002Fcvss\u002Fv3.1\u002Fspecification-document) spec.\n","NGINX Unit 是一个轻量级且多功能的开源服务器，能够原生执行八种不同编程语言的应用代码，并提供静态媒体资产服务。其核心功能包括支持多种编程语言环境、通过RESTful JSON API实现动态更新和灵活配置，以及采用异步多线程架构来确保高性能、低延迟和可扩展性。NGINX Unit 适用于从企业级部署到个人网站等各种复杂度的Web架构中，作为构建高效、可靠应用的基础组件。尽管项目已被归档，不再进行开发维护，但对于寻求简化应用栈同时保证性能与灵活性的开发者而言，它仍然是一个有价值的工具。",2,"2026-06-11 03:07:26","top_language"]