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

顶棒 技术支持 东莞网站建设去河南省住房和城乡建设厅网站查

顶棒 技术支持 东莞网站建设,去河南省住房和城乡建设厅网站查,wordpress后台用户名,河南公司网站可以做天津备案吗https 访问我们的测试域名 https://www.xxx.com 站点#xff0c;但是当我们直接在浏览器地址栏中直接输入 www.xxx.com 的时候却发现进入的是 http 协议的网站#xff0c;这与我们的初衷不一致。由于浏览器默认访问域名使用的是80端口#xff0c;而当我们使用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!EXPORT56RC4RSAHIGHMEDIUMLOWSSLv2EXP; #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 Apaches document root location ~ /\.ht { deny all; }}
http://www.dnsts.com.cn/news/177278.html

相关文章:

  • 两学一做纪实评价系统登陆网站网络营销与策划形考任务答案
  • 网站开发用什么系统比较好?做网站的是干嘛的
  • 网站运营专员是干嘛的暴雪被收购
  • 网站的基础服务东营网站推广
  • 汕头网站推广制作怎么做响应式网站管理系统
  • 设计网站页面建设报名系统
  • 五金店网站模板无锡装饰网站建设排名
  • 网站登录入口大全吐鲁番seo招聘
  • 专业网站建设平台公司孝仙洪高速公路建设指挥部网站
  • 网络广告网站怎么做集思吧网站怎么做问卷
  • wordpress网站微信公众号推送做艺术品的网站
  • 河南网站推广怎么做龙岩天宫山住宿怎么订
  • 秦皇岛网站建设建设银行重庆分行网站
  • 做网站需要用什麼服务器国产4k高清电视十大排名
  • 西安网站推广哪家稳定seo 优化 服务
  • 360建站的应用场景做网站宣传费用记什么科目
  • 网站开发指什么网站怎么做自响应
  • 网站正在建设中的网页怎么做上海单位名称大全
  • 做公司企业网站标准尺寸家政网站建设方案分析
  • 手把手教你用动易做网站白云做网站
  • 南通长城建设集团有限公司网站培训机构网站
  • 聊城正规网站建设设计公司重庆川九建设有限责任公司官方网站
  • 免费做文字图网站网络营销的四个步骤
  • 阿里巴巴国际站网站做销售方案做网站几天
  • 做网站公司需要什么条件天津建设工程信息网如何投标报名
  • 建设银行网站用户名怎么查外贸电商平台排行榜
  • 游戏网站排行app的后台和网站的后台差别
  • 做直播教程的网站android开发 wordpress
  • 怎么做交易猫假网站公司网站英文
  • 山东省住房和城乡建设厅网站主页wordpress登录错误