หน้าเว็บ

วันพฤหัสบดีที่ 1 มีนาคม พ.ศ. 2555

Centos 6 Install/Configure httpd


1] Install httpd สำหรับ CentOS6


[root@www ~]#
yum -y install httpd
# remove welcome page
[root@www ~]#
rm -f /etc/httpd/conf.d/welcome.conf

# remove default error page
[root@www ~]#
rm -f /var/www/error/noindex.html

# create a link for Perl
[root@www ~]#
ln -s /usr/bin/perl /usr/local/bin/perl


[2] Configure httpd.


[root@www ~]#
vi /etc/httpd/conf/httpd.conf
# line 44: change
ServerTokens Prod
# line 76: change to ON
KeepAlive On
# line 262: Admin's address
ServerAdmin
root@server.world
# line 276: change to your server's name
ServerName
www.server.world:80
# line 331: change (enable CGI and disable Indexes)
Options FollowSymLinks ExecCGI
# line 338: change
AllowOverride All
# line 402: add file name that it can access only with directory's name
DirectoryIndex index.html index.cgi index.php
# line 536: change
ServerSignature Off
# line 759: make it comment

#AddDefaultCharset UTF-8
# line 796: uncomment and add file-type that apache looks them CGI
AddHandler cgi-script .cgi .pl
[root@www ~]#
/etc/rc.d/init.d/httpd start
Starting httpd:
[ OK ]
[root@www ~]#
chkconfig httpd on

ไม่มีความคิดเห็น:

แสดงความคิดเห็น