|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇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/ |
|