upstream webdav {
server 127.0.0.1:8000;
keepalive 32;
}
server {
listen 9001;
server_name _;
client_max_body_size 0;
location / {
auth_pam "Restricted";
auth_pam_service_name "common-auth";
#rewrite /webdav/(.*) /$1 break;
proxy_pass http://webdav;
proxy_buffering off;
# Keep-alive
proxy_http_version 1.1;
proxy_set_header Connection "";
# Proxy headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
# Proxy timeouts between successive read/write operations, not the whole request.
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
}
}