lnmp环境配置说明
nginx 配置文件
user www;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost 192.168.0.208;
location / {
root html;
index index.html index.htm index.php;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
root /usr/local/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html$fastcgi_script_name;
include fastcgi_params;
}
}
}
php-fpm配置文件:
[root@xiaofeng tmp]# cat php-fpm.conf |grep -v '^;'|grep -v '^$'
[global]
[www]
user = nobody
group = nobody
listen = 127.0.0.1:9000
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
php.ini配置文件要修改几个参数
date.timezone = PRC
max_execution_time = 300
memory_limit = 128M
post_max_size = 16M
upload_max_filesize = 2M
max_input_time = 300
1、php中fastcgi和php-fpm是什么东西
详见连接:http://blog.csdn.net/why_2012_gogo/article/details/51112477
2,lnmp搭建
详见连接: http://blog.csdn.net/fationyyk/article/details/51287950
http://www.cnblogs.com/liyubin/p/5891250.html
3,php平滑重启|
详见连接: http://blog.csdn.net/u010098331/article/details/50737322
4,nginx优化
http://www.jb51.net/article/71173.htm
附录:下载php和nginx用file看下是什么类型的问件