Il 01/09/2012 07:49, Roberto De Ioris ha scritto:

I suggest you to avoid (when you are learning) the uWSGI debian-way, as
you will find very few updated tutorials.

Just follow the 'official' way, run uWSGI from command line with logs
printed to the terminal (so you can see what is going wrong in realtime).


server {
        ...
        location / {
                uwsgi_pass      127.0.0.1:9001;
                include         uwsgi_params;
                uwsgi_param     UWSGI_SCHEME $scheme;
                uwsgi_param     SERVER_SOFTWARE    nginx/$nginx_version;
        }
        location /hg {
                auth_basic "Login Mercurial repositories";
                auth_basic_user_file /var/hg/hgusers;
                uwsgi_pass      127.0.0.1:9002;
                include         uwsgi_params;
                uwsgi_param     SCRIPT_NAME "";
                uwsgi_param     UWSGI_SCHEME $scheme;
                uwsgi_param     SERVER_SOFTWARE    nginx/$nginx_version;
        }
}


uwsgi --http :9002 --mount /hg=/var/hg/hgweb.wsgi

(hgweb.wsgi like debian example set with correct config file)


user autentication is ok, but

/var/log/nginx/error.log

2012/09/01 11:56:17 [error] 9888#0: *35 upstream prematurely closed connection while reading response header from upstream, client: 192.168.1.111, server: ubuntuserver, request: "GET /hg HTTP/1.1", upstream: "uwsgi://127.0.0.1:9002", host: "192.168.1.254"


and uwsgi:

*** Starting uWSGI 1.2.5 (32bit) on [Sat Sep  1 12:02:47 2012] ***
compiled with version: 4.6.3 on 01 September 2012 11:08:54
detected number of CPU cores: 2
current working directory: /home/user
detected binary path: /usr/local/bin/uwsgi
*** WARNING: you are running uWSGI without its master process manager ***
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
uWSGI http bound on :9002 fd 4
spawned uWSGI http 1 (pid: 10864)
uwsgi socket 0 bound to TCP address 127.0.0.1:39026 (port auto-assigned) fd 3
Python version: 2.7.3 (default, Aug  1 2012, 05:27:35)  [GCC 4.6.3]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x8462b40
your server socket listen backlog is limited to 100 connections
*** Operational MODE: single process ***
mounting /var/hg/hgweb.wsgi on /hg
WSGI app 0 (mountpoint='/hg') ready in 0 seconds on interpreter 0x8462b40 pid: 10863 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 10863, cores: 1)


timeout !!!
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to