centos5下nginx+fastcgi+php+mysql搭建dz论坛(下)
user nginx nginx; worker_processes 2;error_log /usr/local/nginx/logs/error.log crit;
pid /usr/local/nginx/logs/nginx.pid;
worker_rlimit_nofile 51200;
events
{
use epoll;
worker_connections 51200;
}
http
{
include mime.types;
default_type application/octet-stream;
charset utf-8;
server_names_hash_bucket_size 128;
keepalive_timeout 60;
tcp_nodelay on;
server
{
listen 80;
server_name localhost;
index index.html index.htm index.php;
root /wwwroot/dz/;
if (-d $request_filename)
{
rewrite ^/(.*)([^/])$ http://$host/$1$2/ permanent;
}
location ~ .*\.php?$
{
include fast-cgi.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
}
log_formataccess'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log /usr/local/nginx/logs/nginx_access.log access;
}
}
页:
[1]