Answer the question
In order to leave comments, you need to log in
How to set up nginx reverse proxy to be completely transparent?
Nginx server - 192.168.1.1
Web server (Nextcloud) - 192.168.1.2
Port 80 and 443 forwarded on the router to 192.168.1.1
Reverse proxy on the sub.domain.com domain is configured on the web server
server {
listen 443 ssl http2;
server_name sub.domain.com;
client_max_body_size 0;
underscores_in_headers on;
ssl on;
ssl_certificate ssl_path;
ssl_certificate_key key_path;
ssl_stapling on;
ssl_stapling_verify on;
location / {
proxy_headers_hash_max_size 512;
proxy_headers_hash_bucket_size 64;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
add_header Front-End-Https on;
proxy_pass_header Server;
proxy_pass https://192.168.1.2/;
}
}
Answer the question
In order to leave comments, you need to log in
and saw a report in the logs,
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question