location /cups {
proxy_pass 127.0.0.1:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_connect_timeout 120;
proxy_send_timeout 120;
proxy_read_timeout 180;
}
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /media http://0.0.0.0:81/
ProxyPassReverse / http://0.0.0.0:81/