峯言凬语 O ever youthful O ever weeping~
本无意与众不同,怎奈何口味太重。
首页
平水韵
颜色表
ABOUT
文章分类
友情链接

从大庆至新肇,年前终于成行了。车窗外白雪皑皑,一片银光延向远方,与苍穹连成一片。车厢内轮轨的叩击声,单调又熟悉,现实与记忆交错呈现于脑海,列车的笛音,原野的回响,冰河的应和,森林的沉默,大地的叹息,飞雪的欢歌,故人的寒暄,情人的呢喃,层层叠沓,冻结了此刻的生命,此生也许就如同这列客车,简单的驶向未知。

2018-08-17 |Nonni | Net

<article id="post-102" class="post-102 post type-post status-publish format-standard hentry category-it">
<div class="post-content">
<div class="entry">
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">IIs中实现Http自动转换到Https方法介绍 (403跳转对SEO有一定影响)</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">1.下载安装URL重写模块:Microsoft URL Rewrite Module</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">32位:http://download.microsoft.com/download/4/9/C/49CD28DB-4AA6-4A51-9437-AA001221F606/rewrite_x86_zh-CN.msi&lt;/p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">64位:http://download.microsoft.com/download/4/E/7/4E7ECE9A-DF55-4F90-A354-B497072BDE0A/rewrite_x64_zh-CN.msi&lt;/p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">或者到脚本之家下载://www.jb51.net/softs/479310.html</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">2.SSL设置不要勾选(很重要)</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"></p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">3.Web.config添加</p>

<div class="jb51code" style="margin: 0px; padding: 0px; width: 660px; text-align: left; color: #222222; text-transform: none; line-height: 25.2px; text-indent: 0px; letter-spacing: normal; overflow: hidden; clear: both; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">

<system.webServer>
  <rewrite>
   <rules>
    <rule name="HTTP to HTTPS redirect" stopProcessing="true">
     <match url="(.*)" />
     <conditions>
      <add input="{HTTPS}" pattern="off" ignoreCase="true" />
     </conditions>
     <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
    </rule>
   </rules>
  </rewrite>
 </system.webServer>

</div>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">收工!~</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">以下方法不推荐</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">1、根据IIS版本备份以下文件:</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">IIS6.0 路径:C:WINDOWSHelpiisHelpcommon403-4.htm</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">IIS7.0以上 路径:C:inetpubcusterrzh-CN403.htm</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">2、把以下内容全部拷贝替换(403-4或403)里面所有内容,保存即可</p>

<div class="jb51code" style="margin: 0px; padding: 0px; width: 660px; text-align: left; color: #222222; text-transform: none; line-height: 25.2px; text-indent: 0px; letter-spacing: normal; overflow: hidden; clear: both; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">

<HTML><HEAD><TITLE>该页必须通过安全通道查看</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=GB2312">
</HEAD><BODY>
<script type="text/javascript">
var url = window.location.href;
    if (url.indexOf("https") < 0) {
     url = url.replace("http:", "https:");
     window.location.replace(url);
    }
</script>
</BODY></HTML>

</div>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">注释:IIS6中,站点属性-》目录安全性-》编辑中把“要求安全通道(SSL)”勾选上即可。
IIS7、8中,SSL设置-》把“要求SSL”勾选即可。</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">APache 版本</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">如果需要整站跳转,则在网站的配置文件的<Directory>标签内,键入以下内容:</p>

<div class="jb51code" style="margin: 0px; padding: 0px; width: 660px; text-align: left; color: #222222; text-transform: none; line-height: 25.2px; text-indent: 0px; letter-spacing: normal; overflow: hidden; clear: both; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">

RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)?$ https://%{SERVER_NAME}/$1 [L,R]

</div>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">如果对某个目录做https强制跳转,则复制以下代码:</p>

<div class="jb51code" style="margin: 0px; padding: 0px; width: 660px; text-align: left; color: #222222; text-transform: none; line-height: 25.2px; text-indent: 0px; letter-spacing: normal; overflow: hidden; clear: both; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">

RewriteEngine on
RewriteBase /yourfolder
RewriteCond %{SERVER_PORT} !^443$
#RewriteRule ^(.*)?$ https://%{SERVER_NAME}/$1 [L,R]
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

</div>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">如果只需要对某个网页进行https跳转,可以使用redirect 301来做跳转!redirect 301 /你的网页 https://你的主机+网页&lt;/p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">Tomcat 版本</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">需要做两个地方改动。
1:server.xml 中配置ssl证书的端口要改成默认的“443”端口,如果已经修改,请直接操作第二步;
2:在web.xml配置文件中添加节点代码:如下</p>

<div class="jb51code" style="margin: 0px; padding: 0px; width: 660px; text-align: left; color: #222222; text-transform: none; line-height: 25.2px; text-indent: 0px; letter-spacing: normal; overflow: hidden; clear: both; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">

<web-app>
.........
<security-constraint>
 <web-resource-collection >
    <web-resource-name >SSL</web-resource-name>
    <url-pattern>/*</url-pattern>
  </web-resource-collection>        
  <user-data-constraint>
  <transport-guarantee>CONFIDENTIAL</transport-guarantee>
  </user-data-constraint>
</security-constraint>
 </web-app>

</div>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">3:回到server.xml 配置文件中找到80端口的节点,里面有默认这个属性是 redirectPort=”8443″ 要改成 “443” 保存重启即可。</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">Nginx版本</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">在配置80端口的文件里面,写入以下内容即可。</p>

<div class="jb51code" style="margin: 0px; padding: 0px; width: 660px; text-align: left; color: #222222; text-transform: none; line-height: 25.2px; text-indent: 0px; letter-spacing: normal; overflow: hidden; clear: both; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">

server {
  listen  80;
  server_name localhost;
  rewrite ^(.*)$ https://$host$1 permanent; 

  location / {
   root html;
   index index.html index.htm;
  }

</div>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">javascript单独页面通用代码段:以下方法较适合做seo搜索或指定某一个子页单独https</p>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">在需要强制为https的页面上加入以下代码进行处理</p>

<div class="jb51code" style="margin: 0px; padding: 0px; width: 660px; text-align: left; color: #222222; text-transform: none; line-height: 25.2px; text-indent: 0px; letter-spacing: normal; overflow: hidden; clear: both; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">

<script type="text/javascript">
var url = window.location.href;
    if (url.indexOf("https") < 0) {
     url = url.replace("http:", "https:");
     window.location.replace(url);
    }
</script>

</div>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">PHP页面跳转:添加在网站php页面内</p>

<div class="jb51code" style="margin: 0px; padding: 0px; width: 660px; text-align: left; color: #222222; text-transform: none; line-height: 25.2px; text-indent: 0px; letter-spacing: normal; overflow: hidden; clear: both; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">

if ($_SERVER["HTTPS"] <> "on") 
{ 
$xredir="https://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; 
header("Location: ".$xredir); 
}

</div>
<p style="margin: 0px; padding: 5px 0px; text-align: left; color: #222222; text-transform: none; line-height: 30px; text-indent: 0px; letter-spacing: normal; font-family: tahoma, arial, 'Microsoft YaHei'; font-size: 14px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">http跳转https的方法较多,以上转自脚本之家,仅供参考。</p>

</div>
</div>
</article>

2018-08-17 |Nonni | Poetry

曾几何时
我你如此年轻
当河水流过
快乐与快乐就汇成了飞纵的一跃
在水底
靠近了自由和爱情
游入了混乱与无奈
直到祭祀的深渊
在灵魂的社坛
幽灵用甜蜜的未生即死让我们窒息而游离
三年后忽然而至的短信衔着渴望
让春风飞舞
轻轻的吹拂着原野上的爱火重燃
我却只能让你静静安睡
忘记坎坷和忧伤
抖落辛酸与苦闷
挥去心碎的过去
然后发现
确已毫无眷意

方法一:
Linux 启动项是在 /etc/rc.local 的 exit 0 语句之间添加启动脚本。

方法二:
使用 update-rc.d 命令添加 / 禁止开机启动项。

将脚本添加开机自启,先放入/etc/init.d文件夹,并给予可执行权限

mv xx.sh /etc/init.d
chmod +x  /etc/init.d/xx.sh

设置开机自启

update-rc.d xx.sh defaults

删除开机自启

update-rc.d -f xx.sh remove

禁止程序开机自启,比如apache2、nginx

update-rc.d -f apache2 remove
update-rc.d -f nginx remove
2018-08-07 |Nonni | TSI

要求kernel >4.9

开启TCP BBR加速

1.修改系统变量:

echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf

如果执行以上命令时显示拒绝访问则可以尝试使用如下命令:

sudo bash -c 'echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf'
sudo bash -c 'echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf'

2.保存生效:

sysctl -p

3.查看是否开启成功

sysctl net.ipv4.tcp_available_congestion_control

如果BBR开启成功返回结果为:

et.ipv4.tcp_available_congestion_control = bbr cubic reno

或者

lsmod|grep bbr

显示以下内容则开启BBR增强版成功

tcp_bbr_powered 16384 23

关闭BBR,修改文件sysctl.conf

vi /etc/sysctl.conf