nginx 实现https代理转发 转发成功后很多js,css等加载不出来,报404 5
我nginx.conf配置文件配置如下:#HTTPSserver#server{listen443;server_namelocalhost;sslon;ssl_cert...
我nginx.conf配置文件配置如下:
# HTTPS server # server { listen 443; server_name localhost; ssl on; ssl_certificate fourfire.cc.crt; ssl_certificate_key fourfire.cc_nopass.key; ssl_session_timeout 5m; ssl_protocols SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; location /aaa { proxy_pass https://10.160.7.230:9043/ibm/console; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; proxy_max_temp_file_size 512m; } location /eloan { proxy_pass https://10.160.7.230:9443/eloan-services; # proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; proxy_max_temp_file_size 512m; } }
不知道错在哪里,请大神指教 展开
# HTTPS server # server { listen 443; server_name localhost; ssl on; ssl_certificate fourfire.cc.crt; ssl_certificate_key fourfire.cc_nopass.key; ssl_session_timeout 5m; ssl_protocols SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; location /aaa { proxy_pass https://10.160.7.230:9043/ibm/console; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; proxy_max_temp_file_size 512m; } location /eloan { proxy_pass https://10.160.7.230:9443/eloan-services; # proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; proxy_max_temp_file_size 512m; } }
不知道错在哪里,请大神指教 展开
1个回答
2015-09-18
展开全部
您好,nginx服务器SSL证书配置如下,请你自查,下面是用的沃通SSL测试证书,你可要申请沃通免费SSL证书用。
打开 Nginx 安装目录下 conf 目录中的 nginx.conf 文件找到
# HTTPS server
#
#server {
# listen 443;
# server_name localhost;
# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_timeout 5m;
# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
将其修改为 :
server {
listen 443;
server_name localhost;
ssl on;
ssl_certificate sslkey/wosign.com.crt; (证书公钥)
ssl_certificate_key sslkey/wosign.com.key; (证书私钥)
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ALL:!ADH:!EXPORT56:-RC4+RSA:+HIGH:+MEDIUM:!EXP;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html index.htm;
}
}
保存退出,并重启 Nginx。通过 https 方式访问您的站点,测试站点证书的安装配置。
打开 Nginx 安装目录下 conf 目录中的 nginx.conf 文件找到
# HTTPS server
#
#server {
# listen 443;
# server_name localhost;
# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_timeout 5m;
# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
将其修改为 :
server {
listen 443;
server_name localhost;
ssl on;
ssl_certificate sslkey/wosign.com.crt; (证书公钥)
ssl_certificate_key sslkey/wosign.com.key; (证书私钥)
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ALL:!ADH:!EXPORT56:-RC4+RSA:+HIGH:+MEDIUM:!EXP;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html index.htm;
}
}
保存退出,并重启 Nginx。通过 https 方式访问您的站点,测试站点证书的安装配置。
Storm代理
2023-08-29 广告
2023-08-29 广告
"StormProxies是全球大数据IP资源服务商,其住宅代理网络由真实的家庭住宅IP组成,可为企业或个人提供满足各种场景的代理产品。点击免费测试(注册即送1G流量)StormProxies有哪些优势?1、IP+端口提取形式,不限带宽,I...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询