Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: Nginx as Reverse Proxy for Home Server

$
0
0
Hi,

i just had a similar issue forwarding requests to my NAS from QNAP. Therefore i decided to define a second server-section like the following:

server {
listen 443;
server_name nas.DOMAIN.COM;

ssl_certificate SSLCERT;
ssl_certificate_key PRIVKEY;
ssl_dhparam /dhparams.pem;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+RC4:EECDH:EDH+aRSA:HIGH:!RC4:!aNULL:!eNULL:!L$

ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
add_header X-Frame-Options DENY;
add_header Cache-control: no-store;
add_header X-XSS-Protection "1; mode=block";


client_max_body_size 2m;


location / {
proxy_set_header HOST $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_pass https://INTERNAL_IP:PORT;
proxy_redirect off;
proxy_buffering off;
}


For me this solution is working perfectly.
I hope this help's.

Best Regards,
Daniel

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>