编译安装时候加上这个--with-http_ssl_module
生成ssl证书443.crt和443.key
nginx配置文件里这样写
server {
listen 80;
listen 443 ssl;
server_name ~^(.*);
ssl_certificate /usr/local/nginx/conf/keys/443.crt;
ssl_certificate_key /usr/local/nginx/conf/keys/443.key;
location / {
resolver 172.16.168.2;
proxy_pass https://$http_host$request_uri;
proxy_set_header Host $http_host;
时间: 2024-10-13 12:28:19