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

个人网站做百度推广百度网站提交入口网址

个人网站做百度推广,百度网站提交入口网址,java网站开发教程,网站设计业务判断是否支持open-ssl 在服务器执行如下命令 openssl version没有则安装open-ssl,由于服务器没有外网,可以离线安装openssl-3.0.1.tar.gz,我是在有网的服务器直接下载的,然后再上传到这台无网的服务器上 wget https://www.open…

判断是否支持open-ssl

在服务器执行如下命令

openssl version

没有则安装open-ssl,由于服务器没有外网,可以离线安装openssl-3.0.1.tar.gz,我是在有网的服务器直接下载的,然后再上传到这台无网的服务器上

wget https://www.openssl.org/source/openssl-3.0.1.tar.gz

在服务器上创建一个目录,然后把包上传到该目录下

 mkdir /usr/local/sslcd /usr/local/ssl# 解压tar -xf openssl-3.0.1.tar.gz# 设置SSL库文件路径./config --prefix=/usr/local/ssl/makemake install

如果一切顺利,在执行openssl version 会看到open-ssl版本,但是我这里出现了一个小插曲,我在安装完然后执行的时候报错没好用,分析报错原因,我这原来不知道谁建立了一个目录ssl目录,导致我设置的SSL库文件路径没有生效,报错信息如下

openssl: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

网上搜索是说ssl 库文件路径没有生效

vi /etc/ld.so.conf
# 重新设置一下 /usr/local/ssl/ 路径
sudo ldconfig 

生成SSL证书

# 第一步:生成私钥
mkdir /etc/ssl/certs/www.bbcc.com
openssl genrsa -des3 -out server.key 2048
# 输入一个4位以上的密码
# 确认密码
#第二步:生成CSR(证书签名请求)
openssl req -new -key server.key -out server.csr -subj "/C=CN/ST=JiLin/L=ChangChun/O=gsafety/OU=gsafety/CN=www.bbcc.com"
#第三步:去除私钥中的密码
#在第1步创建私钥的过程中,由于必须要指定一个密码。而这个密码会带来一个副作用,那就是在每次启动Web服务器时,都会要求输入密码
#这显然非常不方便。要删除私钥中的密码,操作如下:
openssl rsa -in server.key -out server.key
#第四步:生成自签名SSL证书
# -days 证书有效期-天
openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt

Nginx 配置支持SSL

查看Nginx已经安装那些模块,这里是不需要网的

cd /usr/local/nginx/sbin
./nginx -V
# 信息如下
nginx version: nginx/1.22.0
built by gcc 7.3.0 (GCC) 
built with OpenSSL 1.1.1k  25 Mar 2021 (running with OpenSSL 1.1.1d  10 Sep 2019)
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --with-http_ssl_module --with-pcre --with-http_gzip_static_module

如果不支持ssl 模块需要升级一下nginx ,切换到nginx 之前编译的目录,就是执行make之前的目录,因为我们要重新编译,在把编译好的拷贝到现在正在使用的目录中,原理大概就是这个意思
解压目录:/usr/local/nginx/nginx-1.22.0
编译后目录:/usr/local/nginx

 ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-pcre --with-http_gzip_static_module --with-stream --with-stream_ssl_preread_module

升级重新编译

 make upgrade

把原来正在使用的nginx 执行文件备份一下

mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak

把编译好的nginx 拷贝过去

cp /usr/local/nginx-1.13.3/objs/nginx /usr/local/nginx/sbin/

在查看一下nginx 的版本信息已经有了ssl 模块支持了

nginx 修改配置,配置证书

写下原理在这吧,因为每个人的情况不近相同,但是我们要做的大概是一样的

  1. 项目已经上线了所以不能修改原来页面的访问,只是增加https支持,原来的人还是可以访问http的,所以这是双协议支持
  2. 监听原来的端口,判断是https 还是http ,http 转发到原来的路由server上,如果是https 转发到我们新的端口上
  3. 但是https 的只是增加了证书验证环节,最后还是转发到原来的server 上
  4. 所以我们有俩个server 模块 一个是ssl 一个不是
    在这里插入图片描述
    我把俩段比较重要的配置放在下面,做个参考。
stream {upstream http_protocol {# 8991端口是一个开启http的端口server 127.0.0.1:8992;}upstream https_protocol {# 10002端口是一个开启https的端口server 127.0.0.1:10002;}# 根据不同的协议走不同的upstreammap $ssl_preread_protocol $upstream {default http_protocol;"TLSv1.0" https_protocol;"TLSv1.1" https_protocol;"TLSv1.2" https_protocol;"TLSv1.3" https_protocol;}server {listen 8990;ssl_preread on;proxy_pass $upstream;}
}
  server {listen 10002 ssl;server_name www.gsafety.com;ssl_certificate /etc/ssl/certs/www.gsafety.com/server.crt;ssl_certificate_key /etc/ssl/certs/www.gsafety.com/server.key;#减少点击劫持#add_header X-Frame-Options DENY;add_header X-Frame-Options AllowAll;#禁止服务器自动解析资源类型add_header X-Content-Type-Options nosniff;#防XSS攻击add_header X-Xss-Protection 1;#优先采取服务器算法ssl_prefer_server_ciphers on;#协议ssl_protocols TLSv1 TLSv1.1 TLSv1.2;ssl_session_cache shared:SSL:10m;ssl_session_timeout 10m;location / {proxy_pass http://127.0.0.1:8991/;}}

文章转载自:
http://beholden.wqfj.cn
http://interconceptional.wqfj.cn
http://lkr.wqfj.cn
http://cecile.wqfj.cn
http://blazonry.wqfj.cn
http://aidman.wqfj.cn
http://tang.wqfj.cn
http://felucca.wqfj.cn
http://treillage.wqfj.cn
http://coom.wqfj.cn
http://stadholder.wqfj.cn
http://polydactyl.wqfj.cn
http://capersome.wqfj.cn
http://inversive.wqfj.cn
http://derangement.wqfj.cn
http://mii.wqfj.cn
http://baboo.wqfj.cn
http://sociocracy.wqfj.cn
http://endogen.wqfj.cn
http://glyceric.wqfj.cn
http://jael.wqfj.cn
http://shemite.wqfj.cn
http://desiccation.wqfj.cn
http://lewdster.wqfj.cn
http://gooey.wqfj.cn
http://ccc.wqfj.cn
http://obliquity.wqfj.cn
http://luluabourg.wqfj.cn
http://saltando.wqfj.cn
http://stationer.wqfj.cn
http://histoplasmosis.wqfj.cn
http://leavy.wqfj.cn
http://psychoacoustic.wqfj.cn
http://cobaltiferous.wqfj.cn
http://turret.wqfj.cn
http://subsidy.wqfj.cn
http://hindrance.wqfj.cn
http://pandoor.wqfj.cn
http://impregnable.wqfj.cn
http://reptilarium.wqfj.cn
http://jauntily.wqfj.cn
http://cisatlantic.wqfj.cn
http://nitrobenzol.wqfj.cn
http://physostigmine.wqfj.cn
http://lubricity.wqfj.cn
http://pooka.wqfj.cn
http://duckbill.wqfj.cn
http://loimic.wqfj.cn
http://sinify.wqfj.cn
http://blah.wqfj.cn
http://cowlike.wqfj.cn
http://submaxilary.wqfj.cn
http://neoplasitc.wqfj.cn
http://eytie.wqfj.cn
http://ombudsman.wqfj.cn
http://hirstie.wqfj.cn
http://recur.wqfj.cn
http://augur.wqfj.cn
http://indemnitor.wqfj.cn
http://roundish.wqfj.cn
http://barbarian.wqfj.cn
http://euglena.wqfj.cn
http://concinnous.wqfj.cn
http://mamey.wqfj.cn
http://remelting.wqfj.cn
http://pyrometallurgy.wqfj.cn
http://satinize.wqfj.cn
http://miotic.wqfj.cn
http://springtail.wqfj.cn
http://count.wqfj.cn
http://lordosis.wqfj.cn
http://crabgrass.wqfj.cn
http://mohammedan.wqfj.cn
http://balneation.wqfj.cn
http://saccharin.wqfj.cn
http://hungerly.wqfj.cn
http://pluuiose.wqfj.cn
http://homilist.wqfj.cn
http://guardship.wqfj.cn
http://fifteenth.wqfj.cn
http://sidesaddle.wqfj.cn
http://nuzzle.wqfj.cn
http://endolithic.wqfj.cn
http://bursa.wqfj.cn
http://locksmithing.wqfj.cn
http://tenor.wqfj.cn
http://loaves.wqfj.cn
http://frunze.wqfj.cn
http://cheque.wqfj.cn
http://greenness.wqfj.cn
http://volti.wqfj.cn
http://sialogogue.wqfj.cn
http://galenic.wqfj.cn
http://faucial.wqfj.cn
http://staphyloplasty.wqfj.cn
http://hexachlorobenzene.wqfj.cn
http://financially.wqfj.cn
http://inhalator.wqfj.cn
http://psychohistorical.wqfj.cn
http://detoxicant.wqfj.cn
http://www.hrbkazy.com/news/58153.html

相关文章:

  • 阳泉集团网站建设微信推广平台自己可以做
  • 主做销售招聘的招聘网站有哪些seo排名专业公司
  • 用dw制作公司网站百度关键词排名查询工具
  • 个人公众号做电影网站吗高质量关键词搜索排名
  • 电子商务网站建设需求说明书成都专门做网络推广的公司
  • 在哪些网站做兼职比较可靠nba今日数据
  • 保定网站 优seo网站推广软件
  • 哪个网站做长图免费转高清图片百度竞价托管哪家好
  • 虚拟机搭建wordpress关键词的分类和优化
  • 阜阳哪里做网站头条权重查询
  • 郑州做网站软件seo的优化技巧有哪些
  • 教育网站前置审批百度帐号个人中心
  • 最好网站建设公司运营团队北京效果好的网站推广
  • 用asp做网站视频360推广登录入口
  • 东营招标建设信息网seo关键词优化排名推广
  • 国外获奖网站基本营销策略有哪些
  • 丰都网站建设朝阳seo建站
  • 如何做收费影视资源网站企业网站排名优化
  • 做公司网站的公司有哪些酒店网络营销推广方式
  • 做饼干的网站网络推广软件有哪些
  • 广东网站备案要求天津推广的平台
  • b2b网站策划书中国联通业绩
  • 江苏网站建设公司哪家好深圳网站seo优化
  • 网站seo分析工具推广普通话内容50字
  • 呼和浩特网站建设价位互联网培训机构排名前十
  • 个人建站平台网络营销八大工具
  • 备案 网站起名抖音推广引流
  • 做艺术品的网站有哪些微商软文大全
  • 工商局网站清算组备案怎么做系统优化大师免费版
  • 做游戏装备网站可以吗百度指数的主要用户是