wenjies 发表于 2020-7-27 10:56

以docker方式运行wordPress, nginx 怎样配置才能https转发到wordPress?

在主机 192.168.10.3上运行WordPress:docker run --name wordpress -p 81:80 -d wordpress在主机 192.168.10.5配置Nginx转发 http 可以正常转发,https 访问跳内网ip。。。 https://oscimg.oschina.net/oscnet/up-1cb5d84156bd97965cf4d16412e4d743273.pngserver {    listen 80;    server_namexxx.com;    location / {      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;      proxy_passhttp://192.168.10.3:81;    }}server {    listen       443 ssl;    server_namexxx.com;    ssl_certificate 3147007.pem;    ssl_certificate_key 3147007.key;    ssl_session_cache    shared:SSL:1m;    ssl_session_timeout5m;    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;    ssl_prefer_server_cipherson;    location / {      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;      proxy_passhttp://192.168.10.3:81;    }}
页: [1]
查看完整版本: 以docker方式运行wordPress, nginx 怎样配置才能https转发到wordPress?