Questions tagged [nginx-unit]

From NGINX website https://www.nginx.com/products/nginx-unit/: NGINX Unit is a dynamic application server, capable of running beside NGINX Plus and NGINX Open Source or standalone. Unit supports a RESTful JSON API, deploys configuration changes without service disruptions, and runs apps built with multiple languages and frameworks. Designed from scratch around the needs of your distributed applications, it lays the foundation for your service mesh.

22 questions
4
votes
0 answers

After Nginx Unit, Do we still need ASGI like Uvicorn, Hypercorn, Daphne etc

I checked NGINX Unit documentation for deploying FastAPI and Django Channels. They did not use any ASGI like Uvicorn, Hypercorn, Daphne. Their configuration page also did not mention anything about using these servers. Updates to NGINX Unit for…
Ahmad Ismail
  • 11,636
  • 6
  • 52
  • 87
2
votes
1 answer

fastcgi_finish_request() causes WP Cron to fail

My WordPress site was failing to run scheduled tasks. I went through wp-cron.php and found that commenting-out the following if-statement resolved the problem: if ( function_exists( 'fastcgi_finish_request' ) && version_compare( phpversion(),…
2
votes
1 answer

Can a module import of a pex from pantsbuild be exposed?

Cross-post from https://github.com/pantsbuild/pex/issues/1181 as I didn't really know where to ask this. I'm using Nginx Unit, which has an ASGI configuration for my FastAPI application. It's working fine, but I have no clue how to use it with a…
SJoshi
  • 1,866
  • 24
  • 47
2
votes
1 answer

NGINX Unit + Flask = not found among the available application modules

this is happens when i upload config.json: sudo curl -X PUT --data-binary @config.json --unix-socket /var/run/control.unit.sock http://localhost/config { "error": "Invalid configuration.", "detail": "The module to run \"python 3.6\"…
user13384117
1
vote
0 answers

How to display app logs in nginx-unit docker?

I am using the official nginx unit docker image, And I would like to run a hello world wsgi application, and being able to print stuff on docker-compose output. How can I do that ? Here the hello world: print('DURING INITIAL SETUP') def…
hl037_
  • 3,520
  • 1
  • 27
  • 58
1
vote
2 answers

Nginx Unit: Static file serving with different folder name

I'm rewriting a Flask application to use NGINX Unit and I am now trying to configure static resources. However I'm using flask blueprints and the folder structure is different from what NGINX Unit expects: { "match": { "uri":…
Niklas B
  • 1,839
  • 18
  • 36
1
vote
1 answer

Running NGINX UNIT in Docker: Unit is running unprivileged, then it cannot use arbitrary user and group

The error I get is this: /usr/local/bin/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, launching Unit daemon to perform initial configuration... 2022/08/31 17:30:45 [warn] 11#11 Unit is running unprivileged, then it cannot use…
1
vote
1 answer

Add multiple application and listeners to NGINX unit

At first I setup application server like this. firstapp.json { "listeners": { "*:8008": { "pass": "applications/first" } }, "applications":{ "first":{ "type":"python 3.8", …
whitebear
  • 11,200
  • 24
  • 114
  • 237
1
vote
1 answer

Nginx uinit cors

I want to handle cors on nginx unit level but I don't know how it make on nginx unit. Example config for nginx if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header…
Grisha
  • 13
  • 3
1
vote
0 answers

Nginx unit requires using port 80 for initial setting?

I installed Nginx unit systemctl status unit ● unit.service - NGINX Unit Loaded: loaded (/lib/systemd/system/unit.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2021-09-02 15:33:30 JST; 4min 29s ago …
whitebear
  • 11,200
  • 24
  • 114
  • 237
1
vote
0 answers

NGINX Unit, Fastapi : The module to run \"python 3.8\" is not found among the available application modules

i'm following the query of the documentation of nginx unit with fastapi => https://unit.nginx.org/howto/fastapi/ I ran this query : curl -X PUT --data-binary @config.json --unix-socket /var/run/control.unit.sock http://localhost/config/ but i got an…
etiyoung
  • 11
  • 1
1
vote
1 answer

The module to run \"java\" is not found among the available application modules

When trying to PUT a Java application onto NGINX Unit it throws an error: root@localhost:~# curl -X PUT -d@start.json '127.0.0.1:8443/config/' { "error": "Invalid configuration.", "detail": "The module to run \"java\" is not found…
quarks
  • 33,478
  • 73
  • 290
  • 513
0
votes
0 answers

Use PyPy with NGINX Unit

I am trying to use NGINX Unit 1.28.0 with pypy 3.7 In NGINX Unit docs there is a section regarding building from source, and I managed to build custom versions of python ./configure python --module=python3.9 --config=python3.9-config However, I…
Nemanja
  • 1
  • 1
0
votes
1 answer

Auto restart the server after capistrano deploy

I have nginx + nginx unit + django python application , and django project is is deployed by capistrano deploy.rb lock "~> 3.16.0" set :application, "mynavi" set :branch, 'master' set :deploy_to, "/var/www/html/mynavi" set :linked_dirs,…
whitebear
  • 11,200
  • 24
  • 114
  • 237
0
votes
2 answers

alternative to basic authentication for nginx-unit?

I have nginx-unit server. I don't use nginx, because my application is fully dynamic and test purpose products. However it doesn't have basic authentication like apache. Is there any alternative to basic authentication on nginx-unit ?? I should use…
whitebear
  • 11,200
  • 24
  • 114
  • 237
1
2