Hi Krzysztof,
Le 2018-02-08 à 15:28, Krzysztof Warzecha a écrit :
Hello,
[uwsgi]
...
socket=127.0.0.1:8000
Is there any web server in the front of the uwsgi? If this is nginx,
are you sure you are using "uwsgi_pass" instead of, for example,
"proxy_pass"?
Yes. I configured nginx like this:
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:8000;
}
/etc/nginx/uwsgi_params:
uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method;
uwsgi_param CONTENT_TYPE $content_type;
uwsgi_param CONTENT_LENGTH $content_length;
uwsgi_param REQUEST_URI $request_uri;
uwsgi_param PATH_INFO $document_uri;
uwsgi_param DOCUMENT_ROOT $document_root;
uwsgi_param SERVER_PROTOCOL $server_protocol;
uwsgi_param HTTPS $https if_not_empty;
uwsgi_param REMOTE_ADDR $remote_addr;
uwsgi_param REMOTE_PORT $remote_port;
uwsgi_param SERVER_PORT $server_port;
uwsgi_param SERVER_NAME $server_name;
uwsgi_param REMOTE_USER $remote_user;
uwsgi_param SCRIPT_NAME "";
uwsgi_cache_valid 200 302 10m;
Could you replace socket= with http-socket= and query it with curl, like that?
curl -v http://127.0.0.1:8000/benchmark
Thats interesting. When using the http-socket param, i get the following
messages:
add uwsgi var: REQUEST_METHOD = GET
add uwsgi var: REQUEST_URI = /benchmark/
add uwsgi var: PATH_INFO = /benchmark/
add uwsgi var: QUERY_STRING =
add uwsgi var: SERVER_PROTOCOL = HTTP/1.1
add uwsgi var: SCRIPT_NAME =
add uwsgi var: SERVER_NAME = marina
add uwsgi var: SERVER_PORT = 8000
add uwsgi var: REMOTE_ADDR = 127.0.0.1
I suspect uWSGI doesn't properly pick up magic nginx variables when
using PyPy.
Etienne
--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/
_______________________________________________
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi