Answer the question
In order to leave comments, you need to log in
How to publish via nginx sharepoint with basic authentification?
Good afternoon. I'm trying to publish sharepoint via nginx. On sharepoint basic auth. There is a repeated request for authentication, endlessly. Rebuilt nginx, added ngx_http_headers_more_filter_module (to use more_set_input_headers). To no avail. Config below.
Thanks in advance.
server {
listen *:80;
server_name my.ru;
location /{
rewrite ^(.*)$ https://my.ru$1 permanent;
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;
}
}
server {
listen *:443 ssl;
server_name my.ru;
ssl on;
ssl_certificate /etc/cert-files/fullchain.crt;
ssl_certificate_key /etc/cert-files/domain.key;
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;
ssl_ciphers 'EECDH+ECDSA+AESGCM:AES128+EECDH:AES128+EDH:!RC4:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!CAMELLIA:! ADH';
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/cert-files/dhparam.pem;
# // resolver 8.8.8.8 8.8.4.4 valid=300s;
# // resolver_timeout 10s;
add_header X-Frame-Options "DENY";
add_header X-Content-Type-Options "nosniff";
add_header Strict-Transport-Security "max-age=31536000";
location /{
proxy_pass http://192.168.1.1:80;
proxy_set_header Authorization $http_authorization;
proxy_pass_header Authorization;
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;
more_set_headers -s 401 'WWW-Authenticate: Basic realm="my.ru"';
more_set_input_headers 'Authorization: $http_authorization';
#proxy_redirect default;
#proxy_pass_request_headers on;
}
}
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