Welcome! Log In Create A New Profile

Advanced

Bad Gateway

Posted by eyeballs 
Bad Gateway
July 10, 2019 10:43AM
Hi Everyone.


We are attempting to use NGINX as a reverse proxy for WebAccess webbased email (upstream apache and tomcat) . We are having some trouble where the body of the email messages are not appearing.


On another server we are having an issue where the connection fails with a Bad gateway.


The nginx server blocks are similiar for both servers and is listed here for review:

#############################################################################

#####################################################
# webaccess (60) **80
#####################################################

server {
listen 80;
listen [::]:80;
server_name webaccess.sub.org;
return 301 https://$server_name;
location / {
proxy_pass https://192.168.1.60;
proxy_set_header host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
#try_files $uri $uri/ /index.php?q=$uri&$args;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}

#####################################################
# webaccess.sub.org;(60)**443
#####################################################

server {
listen 443 ssl;
server_name webaccess.sub.org;

ssl_protocols TLSv1.2;
#ssl_protocols TLSv1.3
ssl_prefer_server_ciphers on;
#ssl_dhparam /etc/nginx/dhparam.pem; # openssl dhparam -out /etc/nginx/dhparam.pem 4096
ssl_ciphers ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS;
#ssl_ciphers EECDH+AESGCM:EDH+AESGCM;
ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0
#ssl_session_timeout 24h;
ssl_session_timeout 10m;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off; # Requires nginx >= 1.5.9
ssl_stapling on; # Requires nginx >= 1.3.7
ssl_stapling_verify on; # Requires nginx => 1.3.7
#resolver $DNS-IP-1 $DNS-IP-2 valid=300s; #new item
resolver_timeout 5s; #new item
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"; #new item
add_header X-Frame-Options DENY; #new item
add_header X-Content-Type-Options nosniff; #new item
add_header X-XSS-Protection "1; mode=block"; #new item
keepalive_timeout 300s;

ssl_certificate /etc/letsencrypt/live/webaccess.sub.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/webaccess.sub.org/privkey.pem;

charset utf-8;

location / {
include proxy_params;
proxy_pass https://192.168.1.60;
#proxy_redirect on;

# Handle Web Socket connections
proxy_http_version 1.1;
#proxy_cache_bypass $http_upgrade; ####new

}
############################################################}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 108
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