http {
server {
listen 80;
server_name www.domain1.com;
access_log logs/domain1.access.log main;
location / {
index index.html;
root /var/www/domain1.com/htdocs;
}
}
server {
listen 80;
server_name www.domain2.com;
access_log logs/domain2.access.log main;
location / {
index index.html;
root /var/www/domain2.com/htdocs;
}
}
}
說明:只要在模塊裏面新增模塊;具體的根據您的實際需求去配置。
轉載請註明出處:腳本學堂 http://www.jbxue.com/article/5656.com