跳至正文
  • 125 views
  • 1 min read

nginx 反代理 wordpress 配置文件

新浪微博 豆瓣 QQ 百度贴吧 QQ空间

server
    {
        listen 80;
        #listen [::]:80;
        server_name sn.ruib.cf ;
        location / {
            return 301 https://$host$request_uri;
        }
}
    server {
        listen       443 ssl http2 default_server;
        server_name  sn.ruib.cf;
        ssl_certificate "/etc/nginx/ruib.crt";
        ssl_certificate_key "/etc/nginx/ruib.key";
        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout  10m;
        #ssl_ciphers PROFILE=SYSTEM;
        ssl_prefer_server_ciphers on;

location / {
        proxy_pass http://127.0.0.1:28703;
        proxy_redirect     off;
        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-Host $server_name;
        proxy_set_header   X-Forwarded-Proto https;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 86400;
        client_max_body_size       100m;
    }
    }
}

发表回复

联系站长