感谢您的回答
已经勉强的处理了
user www www;
worker_processes auto;
error_log /www/wwwlogs/nginx_error.log crit;
pid /www/server/nginx/logs/nginx.pid;
worker_rlimit_nofile 51200;
events
{
use epoll;
worker_connections 51200;
multi_accept on;
}
http
{
....
server_tokens off;
access_log off;
server {
#SSL 访问端口号为 443
listen 443 ssl;
#填写绑定证书的域名
server_name zhaoheng.site;
index index.html index.htm index.php;
root /www/wwwroot/zhaoheng.site;
#证书文件名称
ssl_certificate 1_zhaoheng.site_bundle.crt;
#私钥文件名称
ssl_certificate_key 2_zhaoheng.site.key;
ssl_session_timeout 5m;
#请按照以下协议配置
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
#请按照以下套件配置,配置加密套件,写法遵循 openssl 标准。
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
#网站主页路径。此路径仅供参考,具体请您按照实际目录操作。
proxy_pass http://zhaoheng.site:8443;
proxy_redirect off;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Ssl on;
}
location ^~ /admin {
rewrite /admin http://zhaoheng.site:8085/ permanent;
}
}
server {
listen 80;
#填写绑定证书的域名
server_name zhaoheng.site;
#把http的域名请求转成https
return 301 https://$host$request_uri;
}
include /www/server/panel/vhost/nginx/*.conf;
}