Skip to content

Commit d9fddee

Browse files
committed
Merged with the default branch.
2 parents 420395e + 0d48fe7 commit d9fddee

File tree

179 files changed

+2736
-1930
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+2736
-1930
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/build/
2+
Makefile
3+
*.pyc
4+
__pycache__/

.hgtags

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ aa207ced9712132040e6153ceccdaf04c112d02c 1.25.0-1
6161
1613ff17671df2273d48be57115f5fe4827f8cd5 1.26.0-1
6262
1a08f884b24effa8b843d6aeeaf016b6354d1256 1.26.1
6363
069c16dd4ed34d49584028b25f5cba4a4a2eded6 1.26.1-1
64+
8a9055cbe4ffd450fac4d7a849c00e0db5485ad3 1.27.0

CHANGES

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,40 @@
11

2+
Changes with Unit 1.27.0 02 Jun 2022
3+
4+
*) Feature: ability to specify a custom index file name when serving
5+
static files.
6+
7+
*) Feature: variables support in the "location" option of the "return"
8+
action.
9+
10+
*) Feature: support empty strings in the "location" option of the
11+
"return" action.
12+
13+
*) Feature: added a new variable, $request_uri, that includes both the
14+
path and the query parts as per RFC 3986, sections 3-4.
15+
16+
*) Feature: Ruby Rack environment parameter "SCRIPT_NAME" support.
17+
18+
*) Feature: compatibility with GCC 12.
19+
20+
*) Bugfix: Ruby Sinatra applications don't work without custom logging.
21+
22+
*) Bugfix: the controller process could crash when a chain of more than
23+
four certificates was uploaded.
24+
25+
*) Bugfix: some Perl applications failed to process the request body,
26+
notably with Plack.
27+
28+
*) Bugfix: some Spring Boot applications failed to start, notably with
29+
Grails.
30+
31+
*) Bugfix: incorrect Python protocol auto detection (ASGI or WSGI) for
32+
native callable object, notably with Falcon.
33+
34+
*) Bugfix: ECMAScript modules did not work with the recent Node.js
35+
versions.
36+
37+
238
Changes with Unit 1.26.1 02 Dec 2021
339

440
*) Bugfix: occasionally, the Unit daemon was unable to fully terminate;

CONTRIBUTING.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Contributing Guidelines
2+
3+
The following is a set of guidelines for contributing to NGINX Unit. We do
4+
appreciate that you are considering contributing!
5+
6+
## Table Of Contents
7+
8+
- [Getting Started](#getting-started)
9+
- [Ask a Question](#ask-a-question)
10+
- [Contributing](#contributing)
11+
- [Git Style Guide](#git-style-guide)
12+
13+
14+
## Getting Started
15+
16+
Check out the [Quick Installation](README.md#quick-installation) and
17+
[Howto](https://unit.nginx.org/howto/) guides to get NGINX Unit up and running.
18+
19+
20+
## Ask a Question
21+
22+
Please open an [issue](https://github.com/nginx/unit/issues/new) on GitHub with
23+
the label `question`. You can also ask a question on
24+
[Slack](https://nginxcommunity.slack.com) or the NGINX Unit mailing list,
25+
26+
[here](https://mailman.nginx.org/mailman3/lists/unit.nginx.org/)).
27+
28+
29+
## Contributing
30+
31+
### Report a Bug
32+
33+
Ensure the bug was not already reported by searching on GitHub under
34+
[Issues](https://github.com/nginx/unit/issues).
35+
36+
If the bug is a potential security vulnerability, please report using our
37+
[security policy](https://unit.nginx.org/troubleshooting/#getting-support).
38+
39+
To report a non-security bug, open an
40+
[issue](https://github.com/nginx/unit/issues/new) on GitHub with the label
41+
`bug`. Be sure to include a title and clear description, as much relevant
42+
information as possible, and a code sample or an executable test case showing
43+
the expected behavior that doesn't occur.
44+
45+
46+
### Suggest an Enhancement
47+
48+
To suggest an enhancement, open an
49+
[issue](https://github.com/nginx/unit/issues/new) on GitHub with the label
50+
`enhancement`. Please do this before implementing a new feature to discuss the
51+
feature first.
52+
53+
54+
### Open a Pull Request
55+
56+
Before submitting a PR, please read the NGINX Unit code guidelines to know more
57+
about coding conventions and benchmarks. Fork the repo, create a branch, and
58+
submit a PR when your changes are tested and ready for review. Again, if you'd
59+
like to implement a new feature, please consider creating a feature request
60+
issue first to start a discussion about the feature.
61+
62+
63+
## Git Style Guide
64+
65+
- Keep a clean, concise and meaningful `git commit` history on your branch,
66+
rebasing locally and squashing before submitting a PR
67+
68+
- For any user-visible changes, updates, and bugfixes, add a note to
69+
`docs/changes.xml` under the section for the upcoming release, using `<change
70+
type="feature">` for new functionality, `<change type="change">` for changed
71+
behavior, and `<change type="bugfix">` for bug fixes.
72+
73+
- In the subject line, use the past tense ("Added feature", not "Add feature");
74+
also, use past tense to describe past scenarios, and present tense for
75+
current behavior
76+
77+
- Limit the subject line to 67 characters, and the rest of the commit message
78+
to 80 characters
79+
80+
- Use subject line prefixes for commits that affect a specific portion of the
81+
code; examples include "Tests:", "Packages:", or "Docker:", and also
82+
individual languages such as "Java:" or "Ruby:"
83+
84+
- Reference issues and PRs liberally after the subject line; if the commit
85+
remedies a GitHub issue, [name
86+
it](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
87+
accordingly
88+
89+
- Don't rely on command-line commit messages with `-m`; use the editor instead
90+

NOTICE

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11

22
NGINX Unit.
33

4-
Copyright 2017-2021 NGINX, Inc.
4+
Copyright 2017-2022 NGINX, Inc.
5+
Copyright 2017-2022 Valentin V. Bartenev
6+
Copyright 2017-2022 Max Romanov
7+
Copyright 2017-2022 Andrei Zeliankou
8+
Copyright 2018-2022 Konstantin Pavlov
9+
Copyright 2021-2022 Zhidao Hong
10+
Copyright 2021-2022 Oisín Canty
511
Copyright 2017-2021 Igor Sysoev
6-
Copyright 2017-2021 Valentin V. Bartenev
7-
Copyright 2017-2021 Max Romanov
8-
Copyright 2017-2021 Andrei Zeliankou
912
Copyright 2017-2021 Andrei Belov
10-
Copyright 2018-2021 Konstantin Pavlov
1113
Copyright 2019-2021 Tiago Natel de Moura
1214
Copyright 2019-2020 Axel Duch
1315
Copyright 2018-2019 Alexander Borisov

README

Lines changed: 0 additions & 24 deletions
This file was deleted.

README.md

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
# NGINX Unit
2+
3+
## Universal Web App Server
4+
5+
![NGINX Unit Logo](docs/unitlogo.png)
6+
7+
NGINX Unit is a lightweight and versatile open-source server that has
8+
three core capabilities:
9+
10+
- it is an HTTP reverse proxy,
11+
- a web server for static media assets,
12+
- and an application server that runs code in seven languages.
13+
14+
We are building a universal tool that compresses several layers of the modern
15+
application stack into a potent, coherent solution with a focus on performance,
16+
low latency, and scalability. It is intended as a building block for any web
17+
architecture regardless of its complexity, from enterprise-scale deployments to
18+
your pet's homepage.
19+
20+
Unit's native RESTful JSON API enables dynamic updates with zero interruptions
21+
and flexible configuration, while its out-of-the-box productivity reliably
22+
scales to production-grade workloads. We achieve that with a complex,
23+
asynchronous, multithreading architecture comprising multiple processes to
24+
ensure security and robustness while getting the most out of today's computing
25+
platforms.
26+
27+
28+
## Quick Installation
29+
30+
### macOS
31+
32+
``` console
33+
$ brew install nginx/unit/unit
34+
```
35+
36+
For details and available language packages, see the
37+
[docs](https://unit.nginx.org/installation/#homebrew).
38+
39+
40+
### Docker
41+
42+
``` console
43+
$ docker pull docker.io/nginx/unit
44+
```
45+
46+
For a description of image tags, see the
47+
[docs](https://unit.nginx.org/installation/#docker-images).
48+
49+
50+
### Amazon Linux, Fedora, RedHat
51+
52+
``` console
53+
$ curl -sL 'https://unit.nginx.org/_downloads/setup-unit.sh' | sudo -E bash
54+
# yum install unit
55+
```
56+
57+
For details and available language packages, see the
58+
[docs](https://unit.nginx.org/installation/#official-packages).
59+
60+
61+
### Debian, Ubuntu
62+
63+
``` console
64+
$ curl -sL 'https://unit.nginx.org/_downloads/setup-unit.sh' | sudo -E bash
65+
# apt install unit
66+
```
67+
68+
For details and available language packages, see the
69+
[docs](https://unit.nginx.org/installation/#official-packages).
70+
71+
72+
## Running a Hello World App
73+
74+
Suppose you saved a PHP script as `/www/helloworld/index.php`:
75+
``` php
76+
<?php echo "Hello, PHP on Unit!"; ?>
77+
```
78+
79+
To run it on Unit with the `unit-php` module installed, first set up an
80+
application object. Let's store our first config snippet in a file called
81+
`config.json`:
82+
83+
``` json
84+
{
85+
"helloworld": {
86+
"type": "php",
87+
"root": "/www/helloworld/"
88+
}
89+
}
90+
```
91+
92+
Saving it as a file isn't necessary, but can come in handy with larger objects.
93+
94+
Now, `PUT` it into the `config/applications` section of Unit's control API,
95+
usually available by default via a Unix domain socket:
96+
97+
``` console
98+
# curl -X PUT --data-binary @config.json --unix-socket \
99+
/path/to/control.unit.sock http://localhost/config/applications
100+
```
101+
``` json
102+
103+
{
104+
"success": "Reconfiguration done."
105+
}
106+
```
107+
108+
Next, reference the app from a listener object in the `config/listeners`
109+
section of the API. This time, we pass the config snippet straight from the
110+
command line:
111+
112+
``` console
113+
# curl -X PUT -d '{"127.0.0.1:8000": {"pass": "applications/helloworld"}}' \
114+
--unix-socket /path/to/control.unit.sock http://localhost/config/listeners
115+
```
116+
``` json
117+
{
118+
"success": "Reconfiguration done."
119+
}
120+
```
121+
122+
Now Unit accepts requests at the specified IP and port, passing them to the
123+
application process. Your app works!
124+
125+
``` console
126+
$ curl 127.0.0.1:8080
127+
128+
Hello, PHP on Unit!
129+
```
130+
131+
Finally, query the entire `/config` section of the control API:
132+
133+
``` console
134+
# curl --unix-socket /path/to/control.unit.sock http://localhost/config/
135+
```
136+
137+
Unit's output should contain both snippets, neatly organized:
138+
139+
``` json
140+
{
141+
"listeners": {
142+
"127.0.0.1:8080": {
143+
"pass": "applications/helloworld"
144+
}
145+
},
146+
147+
"applications": {
148+
"helloworld": {
149+
"type": "php",
150+
"root": "/www/helloworld/"
151+
}
152+
}
153+
}
154+
```
155+
156+
For full details of configuration management, see the
157+
[docs](https://unit.nginx.org/configuration/#configuration-management).
158+
159+
160+
## Community
161+
162+
- The go-to place to start asking questions and share your thoughts is
163+
our [Slack channel](https://nginxcommunity.slack.com/).
164+
165+
- Our [GitHub issues page](https://github.com/nginx/unit/issues) offers
166+
space for a more technical discussion at your own pace.
167+
168+
- The [project map](https://github.com/orgs/nginx/projects/1) on
169+
GitHub sheds some light on our current work and plans for the future.
170+
171+
- Our [official website](https://unit.nginx.org/) may provide answers
172+
not easily found otherwise.
173+
174+
- Get involved with the project by contributing! See the
175+
[contributing guide](CONTRIBUTING.md) for details.
176+
177+
- To reach the team directly, subscribe to the
178+
[mailing list](https://mailman.nginx.org/mailman/listinfo/unit).
179+
180+
- For security issues, [email us]([email protected]), mentioning
181+
NGINX Unit in the subject and following the [CVSS
182+
v3.1](https://www.first.org/cvss/v3.1/specification-document) spec.
183+

auto/clang

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,21 @@ nxt_feature_test="struct s {
176176
return 1;
177177
}"
178178
. auto/feature
179+
180+
181+
nxt_feature="GCC __attribute__ unused"
182+
nxt_feature_name=NXT_HAVE_GCC_ATTRIBUTE_UNUSED
183+
nxt_feature_run=
184+
nxt_feature_incs=
185+
nxt_feature_libs=
186+
nxt_feature_test="static void f(void) __attribute__ ((__unused__));
187+
188+
static void f(void)
189+
{
190+
return;
191+
}
192+
193+
int main(void) {
194+
return 0;
195+
}"
196+
. auto/feature

0 commit comments

Comments
 (0)