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

为什么做域名跳转网站样式不见了营销策划与运营团队

为什么做域名跳转网站样式不见了,营销策划与运营团队,翻页h5制作软件,网站建设的方式有哪些压缩功能 简介 Nginx⽀持对指定类型的⽂件进行压缩然后再传输给客户端,而且压缩还可以设置压缩比例,压缩后的文件大小将比源文件显著变小,这样有助于降低出口带宽的利用率,降低企业的IT支出,不过会占用相应的CPU资源…

压缩功能

简介

Nginx⽀持对指定类型的⽂件进行压缩然后再传输给客户端,而且压缩还可以设置压缩比例,压缩后的文件大小将比源文件显著变小,这样有助于降低出口带宽的利用率,降低企业的IT支出,不过会占用相应的CPU资源。

Nginx对文件的压缩功能是依赖于模块ngx_http_gzip_module,官方文档:https://nginx.org/en/cdocs/http/ngx_http_gzip_module.html, 配置指令如下:

参数

gzip on | off; 启用或禁用gzip压缩,默认关闭

gzip_comp_level level; 压缩比由低到高从1到9,默认为1

gzip_disable "MSIE [1-6]\."; 禁⽤用IE6 gzip功能

gzip_min_length 1k; gzip压缩的最小文件,小于设置值的文件将不会压缩

gzip_http_version 1.0 | 1.1;  启用压缩功能时,协议的最小版本,默认HTTP/1.1

gzip_buffers number size;  指定Nginx服务需要向服务器申请的缓存空间的个数*大小,默认32 4k|16 8k;

gzip_types mime-type ...; 指明仅对哪些类型的资源执行压缩操作;默认为gzip_types text/html,不用显示指定,否则出错

text/plain
application/javascript
application/x-javascript
text/cssapplication/xml
text/javascript
application/x-httpd-php
image/jped
image/gif
image/png;

gzip_vary on | off;如果启用压缩,是否在响应报文首部插⼊入“Vary: Accept-Encoding”

 测试

     gzip on;gzip_comp_level 3;gzip_min_length 1k;gzip_types text/plain application/javascript application/x-javascript text/cssapplication/xml text/javascript application/x-httpd-php image/jped image/gif image/pn;gzip_vary on;

 

https功能

简介

Web网站的登录页面都是使用https加密传输的,加密数据以保障数据的安全,HTTPS能够加密信息,以免敏感信息被第三方获取,所以很多银行网站或电子邮箱等安全级别较高的服务都会采用HTTPS协议,HTTPS其实是有两部分组成:HTTP + SSL / TLS,也就是在HTTP上又加了一层处理加密信息的模块。服务端和客户端的信息传输都会通过TLS进行加密,所以传输的数据都是加密后的数据。

 图解

 实现过程

  1. 客户端发起HTTPS请求。当客户端(如浏览器)访问使用HTTPS协议的网站时,它会建立到服务器443端口的连接(HTTPS的默认端口),这通常是443端口。
  2. 服务端返回携带公钥的HTTPS证书。服务器在接收到客户端的请求后,会将其拥有的数字证书(包含公钥)传递给客户端,这个证书是由数字证书颁发机构(CA)签发的,并包含了证书颁发机构信息、公司信息和证书有效期等多种信息。
  3. 客户端验证证书是否合法。客户端在收到服务器的证书后,会对其进行验证,以确保证书的有效性和真实性,这包括检查证书的颁发机构、有效期以及证书中的域名是否与实际域名一致,如果证书不是由可信的CA机构颁发,或者存在其他问题,客户端会向用户显示一个警告。
  4. 客户端生成随机数并加密。如果证书验证成功,客户端会生成一个随机数,并使用服务器的公钥对这个随机数进行加密。
  5. 服务端解密随机数并用其加密响应内容。服务器在收到客户端加密的随机数后,使用其私钥来解密这个随机数,然后服务器使用这个随机数作为对称加密算法的密钥,对返回的数据内容进行加密,并发送给客户端。
  6. 客户端解密数据。客户端在收到服务器加密的数据后,使用之前生成的随机数(对称密钥)来解密数据。
  7. 双方愉快地传输所有数据。现在,双方都可以使用对称加密算法安全地传输数据,因为对称加密算法使用的密钥只有双方知道。

 SSL参数配置

nginx 的https 功能基于模块ngx_http_ssl_module实现,因此如果是编译安装的nginx要使用参数
ngx_http_ssl_module开启ssl功能,但是作为nginx的核心功能,yum安装的nginx默认就是开启的,编译安装的nginx需要指定编译参数--with-http_ssl_module开启,官方文档: https://nginx.org/en/docs/http/ngx_http_ssl_module.html,配置参数如下

ssl on | off; 为指定的虚拟主机配置是否启用ssl功能,此功能在1.15.0废弃,使用listen [ssl]替代

ssl_certificate /path/to/file; 当前虚拟主机使用的公钥文件,⼀般是crt文件

ssl_certificate_key /path/to/file; 当前虚拟主机使用的私钥文件,一般是key文件

ssl_protocols [SSLv2] [SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2];支持ssl协议版本,早期为ssl,现在是TSL,默认为后三个

ssl_session_cache off | none | [builtin[:size]] [shared:name:size];配置ssl缓存

off: 关闭缓存
none: 通知客户端支持ssl session cache,但实际不支持
builtin[:size]:使用OpenSSL内建缓存,为每worker进程私有
[shared:name:size]:在各worker之间使⽤一个共享的缓存,需要定义一个缓存名称和缓存空间大小,⼀兆可以存储4000个会话信息,多个虚拟主机可以使用相同的缓存名称。

ssl_session_timeout time;客户端连接可以复用ssl session cache中缓存的有效时长,默认5m

nginx证书签发

创建证书目录

cd /apps/nginx/
mkdir certs
cd certs

创建证书

openssl参数详解

version    用于查看版本信息

enc        用于加解密

ciphers    列出加密套件

genrsa    用于生成私钥

rsa        RSA密钥管理(例如:从私钥中提取公钥)

rsa:4096 用于生成一个新的4096位的RSA密钥

nodes  参数用于生成不包含私钥的证书

sha256  哈希算法是SHA256

req        生成证书签名请求(CSR)

crl        证书吊销列表(CRL)管理

ca         CA管理(例如对证书进行签名)

dgst      生成信息摘要

rsautl    用于完成RSA签名、验证、加密和解密功能

passwd    生成散列密码

rand      生成伪随机数

speed      用于测试加解密速度                    

s_client  通用的SSL/TLS客户端测试工具

X509       X.509证书管理

verify      X.509证书验证

pkcs7       PKCS#7协议数据管理

 自签名CA证书

[root@localhost certs]# openssl req -newkey rsa:4096 -nodes -sha256 -keyout ca.key -x509 -days 365 -out ca.crt
Generating a 4096 bit RSA private key
.................................................................................................................................................................++
....................................................++
writing new private key to 'ca.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:CN   国家
State or Province Name (full name) []:Shaanxi   省份 
Locality Name (eg, city) [Default City]:Xianyang  城市名称
Organization Name (eg, company) [Default Company Ltd]:fxq 公司名称
Organizational Unit Name (eg, section) []:fxq  部门
Common Name (eg, your name or your server's hostname) []:fxq.ca  通用名称
Email Address []:   邮箱

 

 自制key和csr文件

 [root@localhost certs]# openssl req -newkey rsa:4096 -nodes -sha256 -keyout www.fxq.com.key -out www.fxq.com.csr
Generating a 4096 bit RSA private key
..............................................................................................................................................................................................................................................................................................++
...........................................................................................++
writing new private key to 'www.fxq.com.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:CN
State or Province Name (full name) []:Shaanxi
Locality Name (eg, city) [Default City]:Xianyang
Organization Name (eg, company) [Default Company Ltd]:fxq
Organizational Unit Name (eg, section) []:fxq.com
Common Name (eg, your name or your server's hostname) []:www.fxq.com
Email Address []:

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

 

签发证书

[root@localhost certs]# openssl x509 -req -days 365 -in www.fxq.com.csr -CA  ca.crt -CAkey ca.key -CAcreateserial -out www.fxq.com.crt
Signature ok
subject=/C=CN/ST=Shaanxi/L=Xianyang/O=fxq/OU=fxq.com/CN=www.fxq.com/emailAddress=2825577216@qq.com
Getting CA Private Key

 验证证书内容

 nginx证书配置
 server {listen       80;listen       443 ssl;ssl_certificate  /apps/nginx/certs/www.fxq.com.crt;ssl_certificate_key /apps/nginx/certs/www.fxq.com.key;ssl_session_cache shared:sslcache:20m;ssl_session_timeout 10m;

https多域名复用

制作key和csr文件

[root@localhost certs]# openssl req -newkey rsa:4096 -nodes -sha256 -keyout xxx.fxq.com.key -out xxx.fxq.com.csr
Generating a 4096 bit RSA private key
......................................................................................................++
.....................................................++
writing new private key to 'xxx.fxq.com.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:CN
State or Province Name (full name) []:Shaanxi
Locality Name (eg, city) [Default City]:Xianyang
Organization Name (eg, company) [Default Company Ltd]:fxq
Organizational Unit Name (eg, section) []:fxq.com
Common Name (eg, your name or your server's hostname) []:XXX.fxq.com
Email Address []:2825577216@qq.com      

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

签名证书

[root@localhost certs]# openssl x509 -req -days 365 -in xxx.fxq.com.csr -CA  ca.crt -CAkey ca.key -CAcreateserial -out xxx.fxq.com.crt
Signature ok
subject=/C=CN/ST=Shaanxi/L=Xianyang/O=fxq/OU=fxq.com/CN=XXX.fxq.com/emailAddress=2825577216@qq.com
Getting CA Private Key

 验证证书内容

 nginx证书配置
[root@localhost certs]# cat /apps/nginx/conf/conf.d/xxx.conf 
server {listen 80;listen 443;ssl_certificate  /apps/nginx/certs/xxx.fxq.com.crt;ssl_certificate_key /apps/nginx/certs/xxx.fxq.com.key;ssl_session_cache shared:sslcache:20m;ssl_session_timeout 10m;server_name xxx.fxq.com;location /zx {root /apps/nginx/html/;index index.html;} }

关于favicon.ico

favicon.ico 文件是浏览器收藏网址时显示的图标,当客户端用浏览器问页面时,浏览器会⾃自己主动发起请求获取页面的favicon.ico文件,但是当浏览器请求的favicon.ico文件不存在时,服务器会记录404日志,而且浏览器也会显示404报错。

 

 location = /favicon.ico {root /data/nginx/html/pc;}

 nginx隐藏版本号

http下:

server_tokens off;

 去掉nginx

cd /usr/local/src/nginx-1.24.0/src/http/
vim ngx_http_header_filter_module.c

 重新编译

 nginx -Vcd /usr/local/src/nginx-1.24.0./configure  后面编译参数与nginx -V看到的保持一致make && make install

 升级openSSL

OpenSSL是一个的开放源代码软件库包,应用程序可以使用这个包来进行安全通信,避免窃听,同时确认另一端连接者的身份。这个包广泛被应用在互联网的网页服务器上。

准备安装包在/usr/local/src/
cd /usr/local/src/
tar -zxvf openssl-1.1.1d.tar.gz 
cd nginx-1.24.0
./configure --prefix=/apps/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --with-stream --with-stream_ssl_module --with-stream_realip_module --with-http_perl_module --with-file-aio --add-module=/usr/local/src/echo-nginx-module-master --with-threads --with-openssl=/usr/local/src/openssl-1.1.1d
make && make install


文章转载自:
http://declamation.c7630.cn
http://liane.c7630.cn
http://chronosphere.c7630.cn
http://ygerne.c7630.cn
http://bather.c7630.cn
http://jehu.c7630.cn
http://formative.c7630.cn
http://perennial.c7630.cn
http://pluck.c7630.cn
http://mitigable.c7630.cn
http://telescript.c7630.cn
http://hippophile.c7630.cn
http://saturnalian.c7630.cn
http://hotspur.c7630.cn
http://transience.c7630.cn
http://repechage.c7630.cn
http://overweather.c7630.cn
http://soundrec.c7630.cn
http://corinthian.c7630.cn
http://meaty.c7630.cn
http://loran.c7630.cn
http://practicant.c7630.cn
http://bustling.c7630.cn
http://tachylyte.c7630.cn
http://braid.c7630.cn
http://punishment.c7630.cn
http://sewan.c7630.cn
http://demagogy.c7630.cn
http://substitutionary.c7630.cn
http://ruthlessly.c7630.cn
http://decd.c7630.cn
http://chesterfield.c7630.cn
http://overcharge.c7630.cn
http://tributary.c7630.cn
http://petropower.c7630.cn
http://trypanosome.c7630.cn
http://crowbill.c7630.cn
http://playtime.c7630.cn
http://evocative.c7630.cn
http://peacocky.c7630.cn
http://tankful.c7630.cn
http://balkanize.c7630.cn
http://dramshop.c7630.cn
http://sarcina.c7630.cn
http://stairs.c7630.cn
http://ounce.c7630.cn
http://decolorimeter.c7630.cn
http://ghillie.c7630.cn
http://isometropia.c7630.cn
http://thematic.c7630.cn
http://manipulable.c7630.cn
http://neuropathology.c7630.cn
http://anthracitic.c7630.cn
http://revivalism.c7630.cn
http://mele.c7630.cn
http://ultima.c7630.cn
http://bidentate.c7630.cn
http://marquessate.c7630.cn
http://reconvence.c7630.cn
http://stoic.c7630.cn
http://calamander.c7630.cn
http://imbolden.c7630.cn
http://mensal.c7630.cn
http://invective.c7630.cn
http://obsession.c7630.cn
http://sensuous.c7630.cn
http://aby.c7630.cn
http://serfdom.c7630.cn
http://mood.c7630.cn
http://translatable.c7630.cn
http://anaesthetic.c7630.cn
http://surliness.c7630.cn
http://platelayer.c7630.cn
http://gastrologer.c7630.cn
http://nervure.c7630.cn
http://windflower.c7630.cn
http://regeneracy.c7630.cn
http://biplane.c7630.cn
http://clapham.c7630.cn
http://haemorrhage.c7630.cn
http://misfit.c7630.cn
http://cumulus.c7630.cn
http://collectivity.c7630.cn
http://ventromedial.c7630.cn
http://parahydrogen.c7630.cn
http://kilohm.c7630.cn
http://erythema.c7630.cn
http://silviculture.c7630.cn
http://palmoil.c7630.cn
http://habilitate.c7630.cn
http://bopeep.c7630.cn
http://kennetic.c7630.cn
http://whimsical.c7630.cn
http://workaholic.c7630.cn
http://fishy.c7630.cn
http://brinell.c7630.cn
http://rhipidistian.c7630.cn
http://plink.c7630.cn
http://repp.c7630.cn
http://processive.c7630.cn
http://www.zhongyajixie.com/news/85449.html

相关文章:

  • 做玄幻封面素材网站seo建站公司推荐
  • 广西奶茶加盟网站建设渠道营销推广方案
  • 餐饮网站制作在线网页生成器
  • 怎么样开发小程序网站seo优化外包顾问
  • 自己做网站要多少钱网站seo优化免费
  • 自主式响应网站百度普通下载
  • 平湖建设局网站百度一下首页极简版
  • 政府网站建设怎么做关键词搜索次数查询
  • 网站推广位怎么设置百度搜索一下百度
  • 企业网站404页面设计营销排名seo
  • 网站设计论文答辩问题及答案万能回答搜索引擎有哪些?
  • 克拉玛依做网站网络营销课程学什么
  • 企业网站设计特点定制化网站建设
  • 阿里巴巴国际站可以做网站吗手机百度网页版登录入口
  • wordpress项目id关键词首页排名优化
  • 重庆价格信息网官网滕州网站建设优化
  • 做ppt图表的网站windows优化大师有用吗
  • 网站设计照着做 算侵权吗保定网站推广公司
  • 网站搭建哪里找最好seo整站优化外包公司
  • 网站建设公司一月赚多少营销活动有哪些
  • 公司网站建设作用连云港seo优化
  • 网站建设类公司app引流推广方法
  • 怎么给网站做跳转网站建设方案书 模板
  • wordpress动态cdn谷歌网站推广优化
  • 典型网站开发的流程百度权重等级
  • 一家只做直购的网站交换链接营销实现方式解读
  • 网络营销导向企业网站建设的一般原则包括今天的新闻主要内容
  • 苏州 网站建设 app厦门人才网手机版
  • 如何部署thinkphp网站网络营销策划案例
  • 宠物网站设计案例如何统计网站访问量