nginx.conf
###全局块开始###
user nobody nobody;
worker_processes 3;
error_log logs/error/log;
pid nginx.pid;
###全局块结束###
###events块开始###
###http块开始###
http{
include mime.types;
default_type application/octet-stream;
sendfile on; #配置允许使用sendfile方式传输
keepalive_timeout 65;
log_format access.log '$remote_addr-[$time_local]-"$request"-"$http_user_agent"';
###server块开始###
server{
listen 80;
server_name myserver1;
access_log /myweb/server1/log/access.log;
error_page 404 /404.html;
location /server1/location1{
root /myweb;
i ndex index.svr1-loc1.htm;
}
location /server1/location2{
root /myweb;
index index.svr1-loc2.htm;
}
}
server{
}
}
###http块结束###
###events块结束###