Linux   « Crontab | HOME | USB memory stick »

 ■ Apache 2 - WWW server

(Cent OS 4.4)

Install
# yum -y install httpd
# yum -y install php php-mbstring

Setup
# cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.org
# nano /etc/httpd/conf/httpd.conf

ServerTokens OS

ServerTokens Prod (Do not show server name on error page)

ServerAdmin root@localhost

ServerAdmin webmaster@email.com (Shown on error page)

#ServerName www.example.com:80

ServerName wateree.net:80 (Server name)

<Directory "/var/www/html">
Options Indexes FollowSymLinks
  ↓
Options Includes ExecCGI FollowSymLinks (Allow CGI and SSI)

AllowOverride None
  ↓
AllowOverride All (Allow .htaccess)


LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

LogFormat "%h %l %u %t \"%!414r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined (Dont mention in the log for error 414)

SetEnvIf Request_URI "default\.ida" no_log (Dont mention in the log for the access from warm)
SetEnvIf Request_URI "cmd\.exe" no_log
SetEnvIf Request_URI "root\.exe" no_log
SetEnvIf Request_URI "Admin\.dll" no_log
SetEnvIf Request_URI "NULL\.IDA" no_log
#SetEnvIf Remote_Addr 192.168.1 no_log (Dont mention in the log for the access from internal PCs)
CustomLog logs/access_log combined env=!no_log (Mention in the log other than above)


ServerSignature On

ServerSignature Off (Dont show version of Apache on error page)

AddDefaultCharset UTF-8

#AddDefaultCharset UTF-8 (Comment out)

#AddHandler cgi-script .cgi

AddHandler cgi-script .cgi .pl (Add .pl for CGI script)


<Directory "/var/www/icons">
Options Indexes MultiViews

Options MultiViews (Do not show icons directory)
AllowOverride None
Order allow,deny
Allow from all
</Directory>


# ln -s /usr/bin/perl /usr/local/bin/perl (Addtional perl pass)
# whereis perl

# /etc/rc.d/init.d/httpd start
# chkconfig httpd on


If necessary, open the port 80 on the Router.


---------------------------------------------
ExecCGI : CGIスクリプトの実行を許可
FollowSymLinks : シンボリック・リンクを許可
Includes : サーバーサイド・インクルードを許可
IncludesNOEXEC : execコマンドと#includeコマンドを除く、サーバーサイドインクルードを許可
Indexes : DirectoryIndexが存在しないとき、一覧表示
Multiviews : コンテンツ・ネゴシエーター型のマルチビューを許可
SymLinksIfOwnerMatch : ファイルやディレクトリの所有者がリンクの所有者と同じ場合に限り、シンボリック・リンクを許可

投稿者 tomopugh : 2007年03月12日 13:39

Comment

Please comment !




Save the info?


  (Please don't click on "post" twice. It takes time a bit to change to the next screen!!)