React.js, nginx & SSL

I bought a VPS on OVH, which currently runs on Debian 9. I installed successfully SSL over defaults ports (80 and 443) and it's working great when displaying basic html. However, I'm totally lost concerning the run of my react app (basic app to try configuration). It works in http in Safari but doesn't work at all in Chrome : "This site can’t provide a secure connection sent an invalid response. ERR_SSL_PROTOCOL_ERROR"

I already checked the date of my server which is correct. I'm running my app locally with npm start and want to use development mode for now. If you have any advice tho on building the app for production, I'll take it too. I think I'll use docker but I don't how to use it yet.

Here is my nginx configuration.

        listen 80 default_server;
        listen [::]:80 default_server;
        root /usr/share/nginx/html;
        index index.html;

        location ~ /.well-known {
                allow all;
        return 301 https://$server_name$request_uri;

server {
        listen 443 ssl http2 default_server;
        listen [::]:443 ssl http2 default_server;
        ssl        on;
ssl_certificate /etc/letsencrypt/live/
ssl_certificate_key /etc/letsencrypt/live/
ss_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_servers_ciphers on;
ssl_ecdh_curve secp384r1;
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 valid=300s;
resolver_timeout 5s;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
ssl_dhparam /etc/ssl/certs/dhparam.pem;

 location / {
        proxy_pass https://MYIP:3030;
        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;

I'm available to answer any of you questions. Thank you.

1 answer