Nginx 运维架构之(Nginx+PHP)
# cat nginx.confworker_processes2;
events {
worker_connections1024;
}
http {
log_formatmain'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
include mime.types;
default_typeapplication/octet-stream;
sendfile on;
keepalive_timeout65;
server {
listen 80;
server_namewww.martin.com martin.com;
location / {
root html/www;
indexindex.php index.html index.htm;
}
location ~ .*\.(php|php5)?$ {
roothtml/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
access_loglogs/access_www.logmain;
}
server {
listen 80;
server_namebbs.martin.com;
location / {
root html/bbs;
indexindex.php index.html index.htm;
}
location ~ .*\.(php|php5)?$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
access_loglogs/access_bbs.logmain;
}
###status
server{
listen 80;
server_name status.martin.org;
location / {
stub_status on;
access_log off;
}
}
}
页:
[1]