apache:
./configure--prefix=/usr/local/apache2 --enable-module=most --enable-shared=max
php:
'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-sockets' '--enable-ftp' '--with-ldap' '--enable-xml' '--enable-soap' '--with-gd' '--with-zlib' '--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-freetype-dir=/usr' '--with-mcrypt' '--with-curl' '--with-sqlite=shared' '--with-iconv=/usr/local' '--enable-mbstring'
http.conf:
LoadModule php5_module modules/libphp5.so
添加 AddType application/x-httpd-php .php
DirectoryIndex index.html index.php
DocumentRoot
ServerName
User web
Group web
Options Indexes FollowSymLinks 改为 Options FollowSymLinks 防止自动访问程序目录
php.ini:
short_open_tag = On 开启短标识
upload_max_filesize = 10M 上传文件最大支持10M
post_max_size = 10M
upload_tmp_dir = “/tmp” 上传文件默认目录放到tmp下
error_reporting = E_ALL & ~E_NOTICE 错误等级,不显示notice错误
session.save_path= "/tmp" session存放目录