Quantcast
Viewing all articles
Browse latest Browse all 6761

Nginx for reverse

I using my own nginx.conf that like

server {
    listen 80;
    server_name support.mydomain.com;
    
    # 将HTTP请求重定向到HTTPS
    location / {
        return 301 https://$host$request_uri;
    }
}

server {
    listen 443 ssl;
    server_name support.mydomain.com;
    
    ssl_certificate /etc/nginx/ssl/fullchain5.pem;  # 修改为你的SSL证书路径
    ssl_certificate_key /etc/nginx/ssl/privkey5.pem;  # 修改为你的SSL证书私钥路径

    # 强制使用较强的SSL协议和加密套件
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers HIGH:!aNULL:!MD5;

    location / {
        proxy_pass http://192.168.8.201:8080;  # 修改为你的后端服务地址
        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;
    }

    # 如果需要添加其他配置,请在此处添加
}

when i docker-compose up ; and change http_type to https;we met the error CRSF auth failed when new user reg for our site ;


Viewing all articles
Browse latest Browse all 6761

Trending Articles