Answer the question
In order to leave comments, you need to log in
How to organize NGINX as a reverse proxy for a WEBDAV resource based on IIS?
A folder shared via the WEBDAV protocol is deployed on the WEBDAV server based on IIS. When accessing the server directly, everything is fine, authorization passes.
Due to architectural features, all traffic to the network goes through the nginx reverse proxy. And an attempt to access the server through this construction leads to the fact that the process stops at the requirement of a login and password.
It is clear that I can make a direct forwarding from an external router to the WEBDAV server, but I would like an elegant solution that preserves the existing rules for organizing access.
The nginx config is extremely simple:
server {
listen 192.168.0.100:80;
server_name webdav.ru;
access_log /var/log/nginx/webdav.log;
location / {
dav_methods PUT DELETE MKCOL COPY MOVE;
# инструкция ниже не работает (выдает ошибку), но мне кажется дело не в ней, т.к. это же проксирование, а не подключение.
# dav_ext_methods PROPFIND OPTIONS;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header http_x_forwarded_for $remote_addr;
proxy_set_header remote_addr $remote_addr;
proxy_pass http://webdav.local/;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question