当前位置: 首页 > news >正文

淄博桓台网站建设方案百度购物平台客服电话

淄博桓台网站建设方案,百度购物平台客服电话,网站发布信息的基本流程,哪里有专业做网站的https 访问我们的测试域名 https://www.xxx.com 站点,但是当我们直接在浏览器地址栏中直接输入 www.xxx.com 的时候却发现进入的是 http 协议的网站,这与我们的初衷不一致。由于浏览器默认访问域名使用的是80端口,而当我们使用SSL证书后&…

https 访问我们的测试域名 https://www.xxx.com 站点,但是当我们直接在浏览器地址栏中直接输入 www.xxx.com 的时候却发现进入的是 http 协议的网站,这与我们的初衷不一致。

由于浏览器默认访问域名使用的是80端口,而当我们使用SSL证书后,网站的端口就变成了443,所以当我们直接在浏览器中输入网址 www.xxx.com 的时候进入的是 80 端口的 HTTP 站点而不是 443 端口的 HTTPS 站点。

解决方法

这里提供两种 http 跳转到 https 的方法:

1. 使用nginx的 rewrite 将请求过来的 http URL直接重写成 https

server {

listen 80;

#填写绑定证书的域名

server_name www.xxx.com;

#强制将http的URL重写成https

rewrite ^(.*) https://$server_name$1 permanent;

}

2. 使用301重定向的方式将 http 的请求重定向到 https 上

server {

listen 80;

#填写绑定证书的域名

server_name www.xxx.com;

#把http的域名请求转成https

return 301 https://$host$request_uri;

}

3.完整的代码

# https配置

server {

listen 443 ssl;

server_name www.xxx.com xxx.com;

#ssl on; #开启ssl支持

ssl_certificate /data/ssl/www.xxx.com.pem; #指定服务器证书路径

ssl_certificate_key /data/ssl/www.xingguangshe.com.key; #指定私钥证书路径

ssl_session_timeout 5m;

#ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

#ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;

#ssl_prefer_server_ciphers on;

root /myweb/new/xxx.com;

location / {

index index.php index.html index.htm;

if (!-e $request_filename) {

rewrite ^/(.*)$ /index.php/$1 last;

break;

}

}

location ~ \.php/?.*$ {

fastcgi_pass 127.0.0.1:9000;

fastcgi_split_path_info ^(.+\.(?:php|phar))(/.*)$;

fastcgi_intercept_errors on;

fastcgi_index index.php;

include fastcgi_params;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param PATH_INFO $fastcgi_path_info;

#fastcgi_pass php-fpm; #uquq use this

}

location ~ /\.ht {

deny all;

}

}

#http配置

server {

listen 80;

#listen somename:8080;

server_name www.xxx.com xxx.com;

client_max_body_size 80m;

#error_page 404 /data/ymg280/404.html;

#error_page 500 502 503 504 /errors/default/50x.html;

rewrite ^(.*) https://$server_name$1 permanent;

if ($host != 'ww.xxx.com'){

#rewrite ^/(.*)$ http://www.xxx.com/$1 permanent;

}

root /myweb/new/xxx.com;

location / {

index index.php index.html index.htm;

if (!-e $request_filename) {

rewrite ^/(.*)$ /index.php/$1 last;

break;

}

}

#pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

location ~ \.php/?.*$ {

fastcgi_pass 127.0.0.1:9000;

fastcgi_split_path_info ^(.+\.(?:php|phar))(/.*)$;

fastcgi_intercept_errors on;

fastcgi_index index.php;

include fastcgi_params;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param PATH_INFO $fastcgi_path_info;

#fastcgi_pass php-fpm;

}

#deny access to .htaccess files, if Apache's document root

location ~ /\.ht {

deny all;

}

}

http://www.hengruixuexiao.com/news/31621.html

相关文章:

  • wordpress 混合移动appseo站长优化工具
  • 江苏做网站查询百度关键词排名
  • 免费做图素材网站手机百度如何发布广告
  • 多商户商城系统源码专业网站优化推广
  • 看想看的做想做的电影网站好自己做网站设计制作
  • 网站备案医疗保健审批号是什么上海企业seo
  • 山东网站优化推广国际军事新闻最新消息视频
  • 怎么在百度搜索到我的网站北京网络营销推广
  • 海南做网站的技术公司seo关键字优化教程
  • 云南网站开发建设广东seo网络培训
  • 网站设计好 如何将本地网站发布谷歌关键词排名优化
  • 深圳定做网站全球疫情最新消息
  • 织梦网站地图如何做百度知道官网登录入口
  • 北京微网站开发网络营销服务公司有哪些
  • 兴宁公司注册seo没什么作用了
  • 网络营销名词解释答案南和网站seo
  • wordpress能放视频播放器怎么网站排名seo
  • 搭建网站平台有前途吗手机卡顿优化软件
  • 四川网站建设多少钱大数据查询平台
  • 安康网站建设公司价格淘宝怎么优化关键词步骤
  • 免费下载简历自己填写重庆seo排名技术
  • 合肥专业网站制作团队seo网站排名优化公司哪家好
  • 网站开发 8g和16g朝阳区seo
  • 宜昌网站建设公司百度seo排名优化教程
  • 免费wordpress主题下载苏州seo网站优化软件
  • 南京网站定制软文代发价格
  • 校史网站开发技术广州专业seo公司
  • 房产网站关键词优化赣州seo排名
  • 欧洲b2b网站大全百度推广好做吗
  • 邢台路桥建设总公司没有网站吗如何做好网站的推广工作