####设置http服务器
http {
####文件扩展名与文件类型映射表
include mime.types;
####默认文件类型
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
#虚拟主机
server {
listen 8081;
server_name localhost;
charset utf-8;
# access_log logs/aa.access.log info;
location / {
root html/aa;
index index.html index.htm;
}
}
server{
listen 8082;
server_name localhost;
charset utf-8;
# access_log logs/bb.access.log info;
location / {
root html/bb;
index index.html;
}
}
include /usr/local/nginx/conf/vhosts/*;
}
http {
####文件扩展名与文件类型映射表
include mime.types;
####默认文件类型
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
#虚拟主机
server {
listen 8081;
server_name localhost;
charset utf-8;
# access_log logs/aa.access.log info;
location / {
root html/aa;
index index.html index.htm;
}
}
server{
listen 8082;
server_name localhost;
charset utf-8;
# access_log logs/bb.access.log info;
location / {
root html/bb;
index index.html;
}
}
include /usr/local/nginx/conf/vhosts/*;
}