Then edit /etc/httpd/conf/httpd.conf:
vi /etc/httpd/conf/httpd.conf
and change DirectoryIndex to
DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl |
Now configure your system to start Apache at boot time:
chkconfig --levels 235 httpd on
Start Apache:
/etc/init.d/httpd start
11.1 Disable PHP Globally
(If you do not plan to install ISPConfig on this server, please skip this section!)
In ISPConfig you will configure PHP on a per-website basis, i.e. you can specify which website can run PHP scripts and which one cannot. This can only work if PHP is disabled globally because otherwise all websites would be able to run PHP scripts, no matter what you specify in ISPConfig.
To disable PHP globally, we edit /etc/httpd/conf.d/php.conf and comment out the AddType line:
vi /etc/httpd/conf.d/php.conf
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
LoadModule php4_module modules/libphp4.so
#
# Cause the PHP interpreter to handle files with a .php extension.
#
#AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php |
Afterwards we restart Apache:
/etc/init.d/httpd restart
12 ProFTPd
ISPConfig has better support for proftpd than vsftpd, so let's remove vsftpd:
yum remove vsftpd
Because CentOS has no proftpd package, we must use a third-party yum repository to install it:
cd /etc/yum.repos.d/ wget http://centos.karan.org/kbsingh-CentOS-Extras.repo rpm --import http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
Now we can install proftpd:
yum install proftpd
Let's create proftpd's system startup links and start it:
chkconfig --levels 235 proftpd on /etc/init.d/proftpd start
Then create the file /etc/pam.d/ftp with the following content (otherwise you will not be able to log in with system users using FTP):
vi /etc/pam.d/ftp
#%PAM-1.0
auth required pam_unix.so nullok
account required pam_unix.so
session required pam_unix.so |
and restart proftpd:
/etc/init.d/proftpd restart
13 Webalizer
To install webalizer, just run
yum install webalizer
14 Synchronize The System Clock
If you want to have the system clock synchronized with an NTP server do the following:
yum install ntp chkconfig --levels 235 ntpd on ntpdate 0.pool.ntp.org /etc/init.d/ntpd start
15 Install Some Perl Modules
ISPConfig comes with SpamAssassin which needs a few Perl modules to work. We install the required Perl modules with a single command:
yum install perl-HTML-Parser perl-DBI perl-Net-DNS perl-Digest-SHA1
16 Update zlib
CentOS comes with an outdated version of zlib (1.2.1) which has a security hole. Therefore we compile and install the newest zlib (1.2.3) from the sources:
cd /tmp wget http://www.zlib.net/zlib-1.2.3.tar.gz tar xvfz zlib-1.2.3.tar.gz cd zlib-1.2.3 ./configure --shared make make install
17 The End
The configuration of the server is now finished, and if you wish you can now install ISPConfig on it.
17.1 A Note On SuExec
If you want to run CGI scripts under suExec, you should specify /var/www as the home directory for websites created by ISPConfig as CentOS' suExec is compiled with /var/www as
如果您对本文有任何疑问或者建议,请到讨论区发表您的意见:
>>
论坛入口 <<
上一页 1 2 3 4 5 67 下一页
上一篇:centos配置 apache、php、jdk、resin 下一篇:CentOS安装及初始环境设置
|