This content originally appeared on DEV Community and was authored by MUHAMMAD ARBAB ANJUM
Update nginx.conf file:
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 443 ssl;
server_name test.domain.com;
ssl_certificate D:/nginx/ssl/cert.crt;
ssl_certificate_key D:/nginx/ssl/priv.key;
# Enable SSL protocols and settings
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
# Security headers
add_header X-Content-Type-Options nosniff;
# add_header X-Frame-Options DENY; # (Commented out, uncomment if needed)
add_header X-XSS-Protection "1; mode=block";
location / {
proxy_pass http://localhost:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
}
Update Host:
127.0.0.1 -> test.domain.com
This content originally appeared on DEV Community and was authored by MUHAMMAD ARBAB ANJUM