jamesmwh 这是我的nginx配置,不过记得开放相关端口号
server {
listen 80;
server_name yangcloud.online,www.yangcloud.online;
rewrite ^(.*)$ https://www.yangcloud.online$1 permanent;
}
server {
listen 443;
server_name localhost;
ssl on;
ssl_certificate 3545901_yangcloud.online.pem;
ssl_certificate_key 3545901_yangcloud.online.key;
client_max_body_size 1024m;
location / {
proxy_set_header HOST $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8090;
}
}