Valentin V. Bartenev
March 13, 2018 01:50PM
On Tuesday 13 March 2018 13:25:47 avpdnepr wrote:
> root@instance-1:~# cat /root/unit_json/start.json
> {
> "listeners": {
> "*:8300": {
> "application": "blogs"
> },
> "*:8301": {
> "application": "cart"
> }
> },
>
> "applications": {
> "blogs": {
> "type": "php",
> "processes": 20,
> "user": "www-php",
> "group": "www-php",
> "root": "/var/www",
> "index": "index.php"
> },
> "cart": {
> "type": "python",
> "processes": 10,
> "module": "wsgi",
> "user": "root",
> "group": "root",
> "path": "/var/www/app"
> }
> }
> }

Since your Python application() callable is inside the
/var/www/app/index.py file, then your module should
be called "index", not "wsgi".

See the Python documentation about how it works:
https://docs.python.org/3/tutorial/modules.html#the-module-search-path

wbr, Valentin V. Bartenev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

I can not configure the python module through the official Nginx Unit documentation?

avpdnepr March 13, 2018 11:46AM

Re: I can not configure the python module through the official Nginx Unit documentation?

Valentin V. Bartenev March 13, 2018 12:00PM

Re: I can not configure the python module through the official Nginx Unit documentation?

avpdnepr March 13, 2018 12:27PM

Re: I can not configure the python module through the official Nginx Unit documentation?

avpdnepr March 13, 2018 12:28PM

Re: I can not configure the python module through the official Nginx Unit documentation?

Valentin V. Bartenev March 13, 2018 12:40PM

Re: I can not configure the python module through the official Nginx Unit documentation?

avpdnepr March 13, 2018 12:43PM

Re: I can not configure the python module through the official Nginx Unit documentation?

Valentin V. Bartenev March 13, 2018 12:50PM

Re: I can not configure the python module through the official Nginx Unit documentation?

avpdnepr March 13, 2018 01:25PM

Re: I can not configure the python module through the official Nginx Unit documentation?

avpdnepr March 13, 2018 01:25PM

Re: I can not configure the python module through the official Nginx Unit documentation?

Valentin V. Bartenev March 13, 2018 01:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 260
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready