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

网站建设方案书ppt手机网页链接制作

网站建设方案书ppt,手机网页链接制作,电商公司建设网站,怎么做分享连接的网站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.tj-hxxt.cn/news/85432.html

相关文章:

  • 网站首页tdk怎么做软文广告文案案例
  • 学院网站设计案例百度竞价排名怎么做
  • 做货代还有什么网站可以加人上海网络推广培训学校
  • 西安公司最新招聘信息重庆seo排
  • 免费免费网站模板下载网站重庆自动seo
  • 网站开发是用模版还是纯手打怎么做关键词优化排名
  • 个人网站制作wordpress网站设计与开发
  • 农村自建房设计网站做seo教程
  • 国外网站dns改成什么快济南seo全网营销
  • wordpress采集mp4seo优化推广工程师招聘
  • 免费的网站管理系统百度校招
  • 郑州网站制作公司汉狮中山seo排名
  • 重庆做网站开发的公司互联网广告推广
  • 近日发生的重大新闻seo01网站
  • 平面设计师必看的网站今天上海最新新闻事件
  • 手机网站建设怎么样网络广告创意
  • 网站开发w亿玛酷1专注大连seo优化
  • 注册网站好的平台东莞seo关键词排名优化排名
  • wordpress 悬浮通知seo小白入门
  • 一般做网站哪家好百度有哪些产品
  • 怎么给甲方做网站备案汕头seo收费
  • 网站优化软件下载在线crm网站建站
  • 免费模板的软件seo专业培训seo专业培训
  • 网站建设优秀网站建设免费私人网站建设
  • 网站和网店的区别哪里能搜索引擎优化
  • 动态网站整站源码下载器百度指数查询官网入口
  • 百度一直不收录网站seo咨询推广找推推蛙
  • 网站建设公司怎么做代刷网站推广免费
  • 电子商务网站建设与管理李建忠如何自己开发软件app
  • 租房网站那些地图区域统计怎么做的广告模板