user www;
worker_processes 1;
#pid logs/nginx.pid;
events {
use epoll;
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
charset koi8-r;
keepalive_timeout 65;
gzip on;
server {
listen 80;
server_name www.os.com;
index index.php index.html;
root /data/www/htdocs/www;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
log_format www '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /data/www/logs/access.log www;
error_log /data/www/logs/error.log;
}
server {
listen 80;
server_name bbs.os.com;
index index.php index.html;
root /data/www/htdocs/bbs;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
log_format bbs '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /data/www/logs/access.log bbs;
error_log /data/www/logs/error.log;
}
}