server {
listen 80;
server_name www.etangbo.com etangbo.com; #,就是在server_name后添加访问的别名
#日志存放路径
access_log /app/log/www/host.access.log main;
location / {
root /data/www;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
###
server {
listen 80;
server_name bbs.etangbo.com bbs1.etangbo.com;
#日志存放路径
access_log /app/log/bbs/host.access.log main;
location / {
root /data/bbs;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
###
server {
listen 80;
server_name blog.etangbo.com blog1.etangbo.com;
#日志存放路径
access_log /app/log/blog/host.access.log main;
location / {
root /data/blog;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}