55-nginx_conf_https, nginx配置https

【55-nginx_conf_https, nginx配置https】时人不识凌云木,直待凌云始道高。这篇文章主要讲述55-nginx_conf_https, nginx配置https相关的知识,希望能为你提供帮助。

#usernobody; worker_processes1; #error_loglogs/error.log; #error_loglogs/error.lognotice; #error_loglogs/error.loginfo; #pidlogs/nginx.pid; events worker_connections1024; http includemime.types; default_typeapplication/octet-stream; #log_formatmain$remote_addr - $remote_user [$time_local] "$request" #$status $body_bytes_sent "$http_referer" #"$http_user_agent" "$http_x_forwarded_for"; #access_loglogs/access.logmain; sendfileon; #tcp_nopushon; #keepalive_timeout0; keepalive_timeout65; #gzipon; # HTTPS server # server listen443 ssl; server_nameql.gaojilaochacang.com; ssl_certificate/home/gpkey/gp.pem; ssl_certificate_key/home/gpkey/gp.key; ssl_session_cacheshared:SSL:1m; ssl_session_timeout5m; ssl_ciphersHIGH:!aNULL:!MD5; ssl_prefer_server_cipherson; location / proxy_passhttp://127.0.0.1:8080; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto https; proxy_http_version 1.1; # for websocket proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; server listen 80; server_name ql.gaojilaochacang.com; #将请求转成https rewrite ^(.*)$ https://$host$1 permanent;


    推荐阅读