你要跳一下啊
#user nobody; #worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; upstream www.wzpbk.com { server localhost:8080; } server { listen 80; server_name www.wzpbk.com; #rewrite ^ https://$http_host$request_uri? permanent; return 301 https://$http_host$request_uri; } server { listen 443; server_name www.wzpbk.com; ssl on; root html; index index.html index.htm; ssl_certificate cert/111111.pem; ssl_certificate_key cert/22222.key; ssl_session_timeout 5m; 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_ciphers on; location / { root html; proxy_pass http://www.wzpbk.com; index index.html index.htm; } } }
这是我的配置文件分享给你
朋友我刚学nginx能跟我说下我什么原因么?然后我需要CP或模仿你哪段代码?
@胖头陀: 443的那个server不用cpnginx 配置文件详解看看我这个博客,最下面也有例子