On Wednesday, 22 August 2012 at 19:26:53 UTC, Sönke Ludwig wrote:
James Miller has posted a working configuration some time ago
on the D newsgroup:http://forum.dlang.org/thread/mgoveqnyimerdazvjqgb@forum.dlang.org
I think the main issue is that nginx 1.0.x does not support
HTTP/1.1 for its reverse proxy but vibe.d often needs it for
chunked transfers. The thing with "proxysetheader
Content-Length $bodybytessent;" sounds like a bug though
and I will look into it.Regards
Big thanx to you and James Miller! You saved me.
As a result - working config for nginx 1.1.14:
server {
listen 80;
server_name .domain.name;
access_log /var/www/domain.name/log/access.log;
error_log /var/www/domain.name/log/error.log;
location / {
auth_basic "Success Denied";
auth_basic_user_file /var/www/domain.name/.htpasswd;
root /var/www/domain.name/static;
try_files $uri @vibe;
}
location @vibe {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:6174;
proxy_redirect off;
proxy_pass_request_body on;
proxy_set_body $request_body;
proxy_http_version 1.1;
}
}