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

交通局网站建设方案保险公司网站开发

交通局网站建设方案,保险公司网站开发,ui特效网站,电商运营怎么推广一个新品Linux#xff1a;apache网页优化 一、Apache 网页优化二、网页压缩2.1 检查是否安装 mod_deflate 模块2.2 如果没有安装mod_deflate 模块#xff0c;重新编译安装 Apache 添加 mod_deflate 模块2.3 配置 mod_deflate 模块启用2.4 检查安装情况#xff0c;启动服务2.5 测试 m… Linuxapache网页优化 一、Apache 网页优化二、网页压缩2.1 检查是否安装 mod_deflate 模块2.2 如果没有安装mod_deflate 模块重新编译安装 Apache 添加 mod_deflate 模块2.3 配置 mod_deflate 模块启用2.4 检查安装情况启动服务2.5 测试 mod_deflate 压缩是否生效 三、网页缓存3.1 检查是否安装 mod_expires 模块3.2.如果没有安装mod_expires 模块重新编译安装 Apache 添加 mod_expires模块3.3 配置 mod_expires 模块启用3.4 检查安装情况启动服务3.5 测试缓存是否生效 四、隐藏版本信息五、Apache 防盗链5.1 检查是否安装 mod_rewrite 模块5.2 如果没有安装mod_rewrite 模块重新编译安装 Apache 添加 mod_rewrite模块5.3 配置 mod_rewrite 模块启用5.4 网页准备5.5 在盗图网站主机上进行浏览器验证 一、Apache 网页优化 在企业中部署Apache后只采用默认的配置参数会引发网站很多问题换言之默认配置是针对以前较低的服务器配置的以前的配置已经不适用当今互联网时代。为了适应企业需求就需要考虑如何提升Apache的性能与稳定性这就是Apache优化的内容。 二、网页压缩 2.1 检查是否安装 mod_deflate 模块 apachectl -t -D DUMP_MODULES | grep deflate2.2 如果没有安装mod_deflate 模块重新编译安装 Apache 添加 mod_deflate 模块 systemctl stop httpd.service cd /usr/local/httpd/conf mv httpd.conf httpd.conf.bak yum -y install gcc gcc-c pcre pcre-devel zlib-devel cd /opt/httpd-2.4.29/ ./configure \ --prefix/usr/local/httpd \ --enable-so \ --enable-rewrite \ --enable-charset-lite \ --enable-cgi \ --enable-deflate #加入mod_deflate 模块make make install2.3 配置 mod_deflate 模块启用 vim /usr/local/httpd/conf/httpd.conf --52行--修改 Listen 192.198.119.10:80 --105行--取消注释 LoadModule deflate_module modules/mod_deflate.so #开启mod_deflate 模块 --197行--取消注释修改 ServerName www.kgc.com:80 --末行添加-- IfModule mod_deflate.c AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml text/javascript text/jpg text/png #代表对什么样的内容启用gzip压缩 DeflateCompressionLevel 9 #代表压缩级别范围为1~9 SetOutputFilter DEFLATE #代表启用deflate 模块对本站点的输出进行gzip压缩 /IfModule2.4 检查安装情况启动服务 apachectl -t #验证配置文件的配置是否正确 apachectl -t -D DUMP_MODULES | grep deflate #检查 mod_deflate 模块是否已安装deflate_module (shared) #已安装的正确结果systemctl start httpd.service2.5 测试 mod_deflate 压缩是否生效 cd /usr/local/httpd/htdocs 先将game.jpg文件传到/usr/local/httpd/htdocs目录下 vim index.html htmlbodyh1It works!It works!It works!/h1 img srcgame.jpg/ /body/html 在Linux系统中打开火狐浏览器右击点查看元素 选择 网络 --- 选择 HTML、WS、其他 访问 http://192.168.80.10 双击200响应消息查看响应头中包含 Content-Encoding: gzip三、网页缓存 3.1 检查是否安装 mod_expires 模块 apachectl -t -D DUMP_MODULES | grep expires3.2.如果没有安装mod_expires 模块重新编译安装 Apache 添加 mod_expires模块 systemctl stop httpd.service cd /usr/local/httpd/conf mv httpd.conf httpd.conf.bak1yum -y install gcc gcc-c pcre pcre-devel zlib-devel cd /opt/httpd-2.4.29/ ./configure \ --prefix/usr/local/httpd \ --enable-so \ --enable-rewrite \ --enable-charset-lite \ --enable-cgi \ --enable-deflate \ --enable-expires #加入mod_expires 模块make make install3.3 配置 mod_expires 模块启用 vim /usr/local/httpd/conf/httpd.conf --52行--修改 Listen 192.198.80.10:80 --111行--取消注释 LoadModule expires_module modules/mod_expires.so #开启mod_expires 模块 --199行--取消注释修改 ServerName www.kgc.com:80 --末行添加-- IfModule mod_expires.cExpiresActive On #打开网页缓存功能ExpiresDefault access plus 60 seconds #设置缓存60秒 /IfModule3.4 检查安装情况启动服务 apachectl -t #验证配置文件的配置是否正确 apachectl -t -D DUMP_MODULES | grep expires #检查 mod_deflate 模块是否已安装deflate_module (shared) #已安装的正确结果systemctl start httpd.service3.5 测试缓存是否生效 cat /usr/local/httpd/htdocs/index.html 在Linux系统中打开火狐浏览器右击点查看元素 选择 网络 --- 选择 HTML、WS、其他 访问 http://192.168.119.10 双击200消息查看响应头中包含 Expires 项四、隐藏版本信息 vim /usr/local/httpd/conf/httpd.conf --491行--取消注释 Include conf/extra/httpd-default.confvim /usr/local/httpd/conf/extra/httpd-default.conf --55行--修改 ServerTokens Prod #将原本的 Full 改为 Prod只显示名称没有版本 #ServerTokens 表示 Server 回送给客户端的响应头域是否包含关于服务器 OS 类型和编译过的模块描述信息。systemctl restart httpd.service浏览器访问 http://192.168.119.10 双击200消息查看 Server 项五、Apache 防盗链 5.1 检查是否安装 mod_rewrite 模块 apachectl -t -D DUMP_MODULES | grep rewrite5.2 如果没有安装mod_rewrite 模块重新编译安装 Apache 添加 mod_rewrite模块 systemctl stop httpd.service cd /usr/local/httpd/conf mv httpd.conf httpd.conf.bak2 yum -y install gcc gcc-c pcre pcre-devel zlib-devel cd /opt/httpd-2.4.29/ ./configure \ --prefix/usr/local/httpd \ --enable-so \ --enable-rewrite \ #加入mod_rewrite 模块 --enable-charset-lite \ --enable-cgi \ --enable-deflate \ --enable-expiresmake make install5.3 配置 mod_rewrite 模块启用 vim /usr/local/httpd/conf/httpd.conf --157行--取消注释 LoadModule rewrite_module modules/mod_rewrite.so --224行-- Directory /usr/local/httpd/htdocsOptions Indexes FollowSymLinksAllowOverride NoneRequire all grantedRewriteEngine On #打开 rewrite 功能加入 mode_rewrite 模块内容RewriteCond %{HTTP_REFERER} !^http://kgc.com/.*$ [NC] #设置匹配规则RewriteCond %{HTTP_REFERER} !^http://kgc.com$ [NC]RewriteCond %{HTTP_REFERER} !^http://www.kgc.com/.*$ [NC]RewriteCond %{HTTP_REFERER} !^http://www.kgc.com/$ [NC]RewriteRule .*\.(gif|jpg|swf)$ http://www.kgc.com/error.png #设置跳转动作 /DirectoryRewriteCond %{HTTP_REFERER} !^http://www.kgc.com/.*$ [NC] 的字段含义: 字段含义%{HTTP_REFERER}存放一个链接的 URL表示从哪个链接中转访问目录下的静态资源。!^表示不以后面的字符串开头。http://www.kgc.com是本网站的路径按整个字符串匹配。.*$”表示以任意字符结尾。[NC]表示不区分大小写字母。 RewriteRule .*.(gif|jpg|swf)$ http://www.kgc.com/error.png 的字段含义 字段含义.表示匹配一个字符。*表示匹配 0 到多个字符与“.”合起来的意思是匹配 0 到多次前面的任意字符如果是 1 到多次匹配可以用“”表示。\.在这里的“\”是转义符“\.”就代表符号“.”的意思。因为“.”在指令中是属于规则字符有相应的含义 如果需要匹配需要在前面加个转义符“\”其它规则字符如果需要匹配也做同样处理。(gif|jpg|swf)表示匹配“gif”、“jpg”、“swf”任意一个“$”表示结束。最后的规则是以“.gif”、“.jpg”、“.swf”结尾 前面是1到多个字符的字符串也就是匹配图片类型的文件。http://www.kgc.com/error.png表示转发到这个路径 。 整个配置的含义是 使用本网站以外的网站域名 访问本站的图片文件时显示 error.png 这个图片。 5.4 网页准备 Web源主机配置 cd /usr/local/httpd/htdocs 将game.jpg、error.png文件传到/usr/local/httpd/htdocs目录下 vim index.html htmlbodyh1this is kgc.com!/h1 img srcgame.jpg/ /body/htmlecho 192.168.80.10 www.kgc.com /etc/hosts echo 192.168.80.12 www.benet.com /etc/hosts 盗链网站主机 cd /usr/local/httpd/htdocs #yum安装的httpd服务的默认路径为/var/www/html/ vim index.html htmlbodyh1this is benet.com!/h1 img srchttp://www.kgc.com/game.jpg/ /body/htmlecho 192.168.80.10 www.kgc.com /etc/hosts echo 192.168.80.12 www.benet.com /etc/hosts #如果解析不了看一下/etc/resolv.conf有没有更改5.5 在盗图网站主机上进行浏览器验证 http://www.benet.com
文章转载自:
http://www.morning.mrlkr.cn.gov.cn.mrlkr.cn
http://www.morning.ktlfb.cn.gov.cn.ktlfb.cn
http://www.morning.qxlxs.cn.gov.cn.qxlxs.cn
http://www.morning.tdqhs.cn.gov.cn.tdqhs.cn
http://www.morning.bhznl.cn.gov.cn.bhznl.cn
http://www.morning.bkslb.cn.gov.cn.bkslb.cn
http://www.morning.dtmjn.cn.gov.cn.dtmjn.cn
http://www.morning.rfzbm.cn.gov.cn.rfzbm.cn
http://www.morning.rjmg.cn.gov.cn.rjmg.cn
http://www.morning.hqrr.cn.gov.cn.hqrr.cn
http://www.morning.mhpmw.cn.gov.cn.mhpmw.cn
http://www.morning.npbkx.cn.gov.cn.npbkx.cn
http://www.morning.cwgn.cn.gov.cn.cwgn.cn
http://www.morning.xcyzy.cn.gov.cn.xcyzy.cn
http://www.morning.yqqxj26.cn.gov.cn.yqqxj26.cn
http://www.morning.wknbc.cn.gov.cn.wknbc.cn
http://www.morning.zhmgcreativeeducation.cn.gov.cn.zhmgcreativeeducation.cn
http://www.morning.dgckn.cn.gov.cn.dgckn.cn
http://www.morning.ngcsh.cn.gov.cn.ngcsh.cn
http://www.morning.mzbyl.cn.gov.cn.mzbyl.cn
http://www.morning.jbtzx.cn.gov.cn.jbtzx.cn
http://www.morning.fphbz.cn.gov.cn.fphbz.cn
http://www.morning.qtwd.cn.gov.cn.qtwd.cn
http://www.morning.xbdrc.cn.gov.cn.xbdrc.cn
http://www.morning.skrxp.cn.gov.cn.skrxp.cn
http://www.morning.zlnf.cn.gov.cn.zlnf.cn
http://www.morning.kpzrf.cn.gov.cn.kpzrf.cn
http://www.morning.xqbgm.cn.gov.cn.xqbgm.cn
http://www.morning.pcjw.cn.gov.cn.pcjw.cn
http://www.morning.hcrxn.cn.gov.cn.hcrxn.cn
http://www.morning.gwdkg.cn.gov.cn.gwdkg.cn
http://www.morning.ppbqz.cn.gov.cn.ppbqz.cn
http://www.morning.trqzk.cn.gov.cn.trqzk.cn
http://www.morning.wxckm.cn.gov.cn.wxckm.cn
http://www.morning.jbpodhb.cn.gov.cn.jbpodhb.cn
http://www.morning.ccyns.cn.gov.cn.ccyns.cn
http://www.morning.lsjtq.cn.gov.cn.lsjtq.cn
http://www.morning.gzttoyp.com.gov.cn.gzttoyp.com
http://www.morning.yqqgp.cn.gov.cn.yqqgp.cn
http://www.morning.xrpjr.cn.gov.cn.xrpjr.cn
http://www.morning.bwjgb.cn.gov.cn.bwjgb.cn
http://www.morning.cjsrg.cn.gov.cn.cjsrg.cn
http://www.morning.lxyyp.cn.gov.cn.lxyyp.cn
http://www.morning.mbrbk.cn.gov.cn.mbrbk.cn
http://www.morning.kngx.cn.gov.cn.kngx.cn
http://www.morning.jfbbq.cn.gov.cn.jfbbq.cn
http://www.morning.cnxpm.cn.gov.cn.cnxpm.cn
http://www.morning.fkgcd.cn.gov.cn.fkgcd.cn
http://www.morning.dwztj.cn.gov.cn.dwztj.cn
http://www.morning.dmwck.cn.gov.cn.dmwck.cn
http://www.morning.jwdys.cn.gov.cn.jwdys.cn
http://www.morning.jpwmk.cn.gov.cn.jpwmk.cn
http://www.morning.gqflj.cn.gov.cn.gqflj.cn
http://www.morning.qzsmz.cn.gov.cn.qzsmz.cn
http://www.morning.21r000.cn.gov.cn.21r000.cn
http://www.morning.bsgfl.cn.gov.cn.bsgfl.cn
http://www.morning.tmxfn.cn.gov.cn.tmxfn.cn
http://www.morning.zcqtr.cn.gov.cn.zcqtr.cn
http://www.morning.nuobeiergw.cn.gov.cn.nuobeiergw.cn
http://www.morning.rxrw.cn.gov.cn.rxrw.cn
http://www.morning.dgckn.cn.gov.cn.dgckn.cn
http://www.morning.qcdtzk.cn.gov.cn.qcdtzk.cn
http://www.morning.jnptt.cn.gov.cn.jnptt.cn
http://www.morning.lmxzw.cn.gov.cn.lmxzw.cn
http://www.morning.dwwlg.cn.gov.cn.dwwlg.cn
http://www.morning.jlpdc.cn.gov.cn.jlpdc.cn
http://www.morning.qfgxk.cn.gov.cn.qfgxk.cn
http://www.morning.clbgy.cn.gov.cn.clbgy.cn
http://www.morning.pbgnx.cn.gov.cn.pbgnx.cn
http://www.morning.kgsws.cn.gov.cn.kgsws.cn
http://www.morning.mcqhb.cn.gov.cn.mcqhb.cn
http://www.morning.mlgsc.com.gov.cn.mlgsc.com
http://www.morning.ypmqy.cn.gov.cn.ypmqy.cn
http://www.morning.kpxnz.cn.gov.cn.kpxnz.cn
http://www.morning.mnwmj.cn.gov.cn.mnwmj.cn
http://www.morning.bqts.cn.gov.cn.bqts.cn
http://www.morning.mbprq.cn.gov.cn.mbprq.cn
http://www.morning.rpgdd.cn.gov.cn.rpgdd.cn
http://www.morning.wgbsm.cn.gov.cn.wgbsm.cn
http://www.morning.c7622.cn.gov.cn.c7622.cn
http://www.tj-hxxt.cn/news/247459.html

相关文章:

  • 做网站优化需要做什么福州市网站
  • xxx学校校园网站建设实践购物中心招商信息发布平台
  • 乡镇网站建设自查报告陇城科技网站建设
  • 建设集团有限公司网站首页企业的网站公告怎么制作
  • 网站建站平台是什么手机网页设计
  • 龙泉市旅游门户网站建设东莞城市建设管理局
  • 网站建设都有什么类型网站开发设计有哪些
  • 房地产营销门户网站开发互联网营销方案策划写作
  • 白山做网站wordpress登录无响应
  • 郑州专业公司网站建设公司做网站送企业邮箱
  • 做网站常见的语言头像制作免费模板
  • 网站开发都需要什么软件家装公司取名字大全集
  • 江苏工信部网站备案免费制作app的软件下载
  • 陕西专业网站建设wordpress怎么修改密码
  • 网站开发行业代码设计软件网站
  • 流量卡网站哈尔滨网站设计人
  • 如何建单页网站栏目app运营费用预算
  • 网站做跳转链接阿里企业邮箱网页版
  • 徐州网站无障碍建设被黑的网站
  • 南通网站建设规划书软件开发模型主要有哪些
  • 成都专业建网站wordpress主机404
  • 犀牛云网站怎么建设做高端生活方式的网站
  • 杭州 企业门户网站建设seo优化搜索引擎网站优化推广网络关键词优化-乐之家网络科技
  • 长沙网站优化外包公司做大型网站需要多少钱
  • 网站单页在线制作软件招标
  • 网站推广的阶段目标网站建设新零售
  • 江西网站建设公司排名wordpress的title
  • 推广app网站深圳龙华建设工程交易中心网站
  • 金坛网站建设网站建设项目组织图
  • 2018年静安区品牌网站建设天猫alexa的排名