Welcome! Log In Create A New Profile

Advanced

Re: RE: net::ERR_SSL_PROTOCOL_ERROR

February 12, 2020 04:05AM
Hi Reinis,

setting in /etc/nginx/conf.d/default.conf proxy_set_header Host $host in the location / as follows:

server {
listen 443 ssl http2 default_server;
server_name ggc.world;

ssl_certificate /etc/letsencrypt/live/ggc.world/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/ggc.world/privkey.pem; # managed by Certbot

ssl_trusted_certificate /etc/letsencrypt/live/ggc.world/chain.pem;

ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

ssl_session_timeout 5m;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-
draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:50m;
#ssl_stapling on;
#ssl_stapling_verify on;

access_log /var/log/nginx/ggcworld-access.log combined;

add_header Strict-Transport-Security "max-age=31536000";
location = /favicon.ico { access_log off; log_not_found off; }

location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}

server {
listen 80 default_server;
listen [::]:80 default_server;
error_page 497 https://$host:$server_port$request_uri;
server_name www.ggc.world;
return 301 https://$server_name$request_uri;

access_log /var/log/nginx/ggcworld-access.log combined;

add_header Strict-Transport-Security "max-age=31536000";
location = /favicon.ico { access_log off; log_not_found off; }

location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}

upstream websocket {
ip_hash;
server localhost:3000;
}

server {
listen 81;
server_name ggc.world www.ggc.world;

#location / {
location ~ ^/(websocket|websocket\/socket-io) {
proxy_pass http://127.0.0.1:4201;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwared-For $remote_addr;
proxy_set_header Host $host;

proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
}
}

I get "Invalid Host header" :
https://drive.google.com/open?id=1Y8-PsrB7QdTD--TtTHxnYW_dzaxrRKuc
Subject Author Posted

net::ERR_SSL_PROTOCOL_ERROR

MarcoI February 11, 2020 02:22PM

Re: net::ERR_SSL_PROTOCOL_ERROR

J.R. February 11, 2020 07:16PM

Re: net::ERR_SSL_PROTOCOL_ERROR

MarcoI February 12, 2020 01:53AM

RE: net::ERR_SSL_PROTOCOL_ERROR

Reinis Rozitis February 12, 2020 03:04AM

Re: RE: net::ERR_SSL_PROTOCOL_ERROR

MarcoI February 12, 2020 04:05AM

Re: net::ERR_SSL_PROTOCOL_ERROR

MarcoI February 12, 2020 04:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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