I'm not sure I understand what the advantage of wsgi would be, in any case
if somebody finds it useful here is the part of my nginx.conf with which I
run web2py with https access on a remote server; if somebody could post
instructions on running web2py through wsgi on nginx I would like to test
the difference.

server {
        listen       443;
        ssl  on;
        ssl_certificate      /etc/ssl/nginx/nginx.pem;
        ssl_certificate_key  /etc/ssl/nginx/nginx.key;
        keepalive_timeout    70;
        server_name  my.server.name;
        access_log  /var/log/nginx/web2py.access.log;
        location / {
        set $fixed_destination $http_destination;
        if ($http_destination ~* ^https(.*)$)
        {
        set $fixed_destination http$1;
        }
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        #           proxy_set_header
X-Forwarded-For$proxy_add_x_forwarder_for;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header        Destination     $fixed_destination;
        }
}

This works for me. Hope it helps.

Michele

Reply via email to