Welcome! Log In Create A New Profile

Advanced

Re: nginx reverse proxy proxy_pass weirdness

December 18, 2019 07:18AM
Here's an example config that I use:

server {
server_name domain.tld www.domain.tld;
add_header Strict-Transport-Security "max-age=31536000; preload";
keepalive_timeout 70;
#LOGS CONFIG
access_log /usr/local/nginx/logs/domain.tld/domain.tld_access.log;
error_log /usr/local/nginx/logs/domain.tld/domain.tld_error.log warn;
#SSL CONFIG
ssl_certificate /etc/nginx/ssl/domain.tld.pem;
ssl_certificate_key /etc/nginx/ssl/domain.tld.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_dhparam /usr/local/nginx/ssl/dhparam.pem;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
proxy_max_temp_file_size 5120m;
client_max_body_size 5120m;
#set_real_ip_from 192.168.xx.xx/24;
#real_ip_header X-Forwarded-For;
#real_ip_recursive on;
#LISTEN CONFIG
include /usr/local/nginx/conf/listen/domain.tld/*.conf;
#MODSECURITY CONFIG
modsecurity on;
modsecurity_rules_file /usr/local/nginx/conf/domain.tld_modsecurity.conf;

location / {

#Set Real IP Headers
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;

#proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header Host $host;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://webserver02.domain.tld:443;
}

}
Subject Author Posted

nginx reverse proxy proxy_pass weirdness

deeztek December 18, 2019 04:48AM

Re: nginx reverse proxy proxy_pass weirdness

Francis Daly December 18, 2019 05:40AM

Re: nginx reverse proxy proxy_pass weirdness

deeztek December 18, 2019 07:18AM

Re: nginx reverse proxy proxy_pass weirdness

Francis Daly December 18, 2019 07:54AM

Re: nginx reverse proxy proxy_pass weirdness

deeztek December 18, 2019 10:33AM

Re: nginx reverse proxy proxy_pass weirdness

Francis Daly December 18, 2019 11:30AM

Re: nginx reverse proxy proxy_pass weirdness

deeztek December 18, 2019 12:35PM

Re: nginx reverse proxy proxy_pass weirdness

Francis Daly December 19, 2019 07:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 92
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready