1.查看當前UNIX環境下有無運行Apache Web Server
在終端控制臺上運行#ps -ef|grep httpd
如果運行了,會列出一些包含路徑信息的進程;去這個路徑下找httpd.conf即可知服務器的配置。
2.啟動和關閉Apache Web Server
在運行Apache/bin路徑下找到apachectl命令
#apachectl start
#apachectl stop
3.httpd.conf參數介紹:
a.知道WEB的管理目錄位置
找到: ServerRoot "/../..."
b.知道WEB的根目錄位置
找到: DocumentRoot "/../..."
c.知道WEB各虛擬路徑的映射
Alias /icons/ "/opt/www/icons"
..........
ScriptAlias /cgi-bin/ "opt/www/cgi-bin"
..........
d.支持SSI
在
增加Option +Includes +ExecCGI
(其它參數說明:Indexes 容許路徑下的目錄瀏覽 FollowSymlinks 容許使用符號連接,連到別處
MultiViews 找相似的文件名)
去掉加注釋的以下語句:
AddType text/html .shtml
AddHander server-parsed .shtml
(如果想使htm文件支持SSI,增加以下語句
AddType text/html .htm
AddHander server-parsed .htm
)
5.支持CGI
去掉加注釋的以下語句:
AddHandler cgi-script .pl
AddHander cgi-script .cgi
6.初始的文件名
DirectoryIndex index.html
(如果想增加別的類別文件,只需在這后面增加index.htm或index.php即可)
7.性能優化
MaxKeepAliveRequests 1024
MaxClient 256