server {
    listen 80;
    listen [::]:80;
    server_name yyetsdev.dmesg.app;
    index index.html index.htm index.php default.html default.htm default.php;
    

    location / {
        proxy_pass_header Server;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_pass http://yyets-web:8888;
    }

    access_log /var/log/nginx/yyetsdev.dmesg.app.log;
}

server {
    listen 443 ssl http2 ;
    listen [::]:443 ssl http2;
    server_name yyetsdev.dmesg.app;
    index index.html index.htm index.php default.html default.htm default.php;

    ssl_certificate /etc/nginx/certs/dmesg_cf_cert.pem;
    ssl_certificate_key /etc/nginx/certs/dmesg_cf_key.pem;

    ssl_session_timeout 20m;
    ssl_session_cache builtin:1000 shared:SSL:10m;
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers on;

    ssl_dhparam /etc/nginx/certs/dhparam.pem;
    ssl_ciphers 'TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
    ssl_stapling on;
    ssl_stapling_verify on;

    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
    add_header X-Frame-Options "SAMEORIGIN" always;
    add_header X-Xss-Protection "1; mode=block" always;
    add_header X-Content-Type-Options "nosniff" always;

    add_header Content-Security-Policy "default-src https: 'unsafe-inline' 'unsafe-eval' data:;";
    add_header Referrer-Policy "no-referrer-when-downgrade";



    location / {
        proxy_pass_header Server;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_pass http://yyets-web:8888;
    }



    access_log /var/log/nginx/yyetsdev.dmesg.app.log;
}
