RHEL7下Nginx虛擬主機配置
前面兩節講過安裝和配置文件了,這裏寫出配置文件,大家根據內容修改配置文件就可以了。
http {
server{
listen 80;
server_name 192.168.1.20;
access_log log/192.168.1.20 main;
location / {
index index.html;
root /application/nginx/html/;
}
}
server{
linsten 80;
server_name 192.168.1.30;
access_log log/192.168.1.30 main;
location / {
index index.html;
root /application/nginx/html/;
}
}
}