仓酷云

标题: 来一发CentOS下对httpd四之CGI、HTTPS、紧缩设置 [打印本页]

作者: 活着的死人    时间: 2015-1-14 20:30
标题: 来一发CentOS下对httpd四之CGI、HTTPS、紧缩设置
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们!本文报告http的CGI、HTTPS、紧缩等选项的设置。本文所用情况仍是上一次编译装置后的情况,编译装置的博文http://wangfeng7399.blog.51cto.com/3518031/1379373
1、CGI的设置
我们假定在wangfeng7399的目次有一个cgi-bin目次,在目次中有一个可实行的剧本3,内容以下
1

2

3

4

5

6

7

8

9

#!/bin/bash

cat<<EOF

Content-Type:text/html

<pre>

echo"hello"

echo"newTimeis:`date`"

</pre>

EOF

~




我们但愿能在会见剧本3的时分,可以将date显现出来
1)、先启动cgi和alias模块
1

2

LoadModulealias_modulemodules/mod_alias.so

LoadModulealias_modulemodules/mod_alias.so




2)、修正主设置文件
<divstyle="padding-bottom:0px;text-transform:none;background-color:rgb(255,255,255);text-indent:0px;margin:0px;padding-left:0px;padding-right:0px;font:14px/28px宋体,ArialNarrow,arial,serif;white-space:normal;letter-spacing:normal;color:rgb(44,44,44);word-spacing:0px;padding-top:0px;-webkit-text-stroke-width:0px"><divclass="syntaxhighlighteras3"id="highlighter_548559"style="box-sizing:content-box!important;border-bottom:0px;position:relative!important;text-align:left!important;border-left:0px;padding-bottom:0px!important;line-height:1.1em!important;overflow-x:auto!important;overflow-y:visible!important;font-style:normal!important;margin:0.3em0px;outline-style:none!important;outline-color:invert!important;min-height:inherit!important;padding-left:0px!important;outline-width:0px!important;width:718px;bottom:auto!important;padding-right:0px!important;font-family:Consolas,BitstreamVeraSansMono,CourierNew,Courier,monospace!important;background:white;float:none!important;font-size:1em!important;vertical-align:baseline!important;border-top:0px;top:auto!important;right:auto!important;font-weight:normal!important;border-right:0px;padding-top:0px!important;left:auto!important;border-top-left-radius:0px;border-bottom-left-radius:0px;border-bottom-right-radius:0px;border-top-right-radius:0px">
1

2

3

4

5

6

7

8

<divclass="container"style="box-sizing:content-box!important;border-bottom:0px;position:relative!important;text-align:left!important;border-left:0px;padding-bottom:0px!important;line-height:1.1em!important;font-style:normal!important;margin:0px;outline-style:none!important;outline-color:invert!important;min-height:inherit!important;padding-left:0px!important;outline-width:0px!important;width:auto!important;bottom:auto!important;padding-right:0px!important;font-family:Consolas,BitstreamVeraSansMono,CourierNew,Courier,monospace!important;background:nonetransparentscrollrepeat0%0%;float:none!important;font-size:1em!important;vertical-align:baseline!important;overflow:visible!important;border-top:0px;top:auto!important;right:auto!important;font-weight:normal!important;border-right:0px;padding-top:0px!important;left:auto!important;border-top-left-radius:0px;border-bottom-left-radius:0px;border-bottom-right-radius:0px;border-top-right-radius:0px">
<IfModulealias_module>

<divclass="linenumber2index1alt1"style="box-sizing:content-box!important;border-bottom:0px;position:static!important;text-align:left!important;border-left:0px;padding-bottom:0px!important;line-height:1.1em!important;font-style:normal!important;margin:0px;outline-style:none!important;outline-color:invert!important;min-height:inherit!important;padding-left:1em!important;outline-width:0px!important;width:auto!important;bottom:auto!important;padding-right:1em!important;font-family:Consolas,BitstreamVeraSansMono,CourierNew,Courier,monospace!important;white-space:nowrap;background:white;float:none!important;font-size:1em!important;vertical-align:baseline!important;overflow:visible!important;border-top:0px;top:auto!important;right:auto!important;font-weight:normal!important;border-right:0px;padding-top:0px!important;left:auto!important;border-top-left-radius:0px;border-bottom-left-radius:0px;border-bottom-right-radius:0px;border-top-right-radius:0px">ScriptAlias/cgi-bin/
作者: 深爱那片海    时间: 2015-1-16 19:17
标题: 来一发CentOS下对httpd四之CGI、HTTPS、紧缩设置
如果上面的措施没有解决问题,此时你就需要Linux社区的帮助了。Linux的使用者一般都是专业人士,他们有着很好的电脑背景且愿意协助他人。
作者: 灵魂腐蚀    时间: 2015-1-19 14:14
再次,Linux是用C语言编写的,我们有学习C语言的基础,读程序和编写代码方面存在的困难小一点,也是我们能较快掌握的原因之一。?
作者: 海妖    时间: 2015-1-28 07:51
再次,Linux是用C语言编写的,我们有学习C语言的基础,读程序和编写代码方面存在的困难小一点,也是我们能较快掌握的原因之一。?
作者: 老尸    时间: 2015-2-13 13:28
随着Linux技术的更加成熟、完善,其应用领域和市场份额继续快速增大。目前,其主要应用领域是服务器系统和嵌入式系统。然而,它的足迹已遍布各个行业,几乎无处不在。
作者: 再见西城    时间: 2015-3-3 22:15
如果你想深入学习Linux,看不懂因为文档实在是太难了。写的最好的、最全面的文档都是英语写的,最先发布的技术信息也都是用英语写的。
作者: 愤怒的大鸟    时间: 2015-3-11 14:36
其中不乏很多IT精英的心血。我们学透以后更可以做成自己的OS!?
作者: 若相依    时间: 2015-3-19 01:45
一定要学好命令,shell是命令语言,命令解释程序及程序设计语言的统称,shell也负责用户和操作系统之间的沟通。
作者: 若天明    时间: 2015-3-27 03:10
学习Linux半年了~个人认为不会的多在网上找资料网上有很多资料可以搜索到,LS那位说放手去搞。




欢迎光临 仓酷云 (http://www.ckuyun.com/) Powered by Discuz! X3.2