nginx多網(wǎng)站怎么配置

配置文件:

代碼如下:

??? 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;?
???? }
???? }
??? }

說明:
只要在模塊里面新增模塊;具體的根據(jù)您的實(shí)際需求去配置。

? 版權(quán)聲明
THE END
喜歡就支持一下吧
點(diǎn)贊7 分享