假設Nginx服務同時配置了192.168.25.100/141兩個IPhtml
server {
listen 80;
server_name 192.168.25.141;
location / {
root /usr/share/nginx/html/html-141;
index index.html index.htm;
}
}
server {
listen 80;
server_name 192.168.25.100;
location / {
root /usr/share/nginx/html/html-100;
index index.html index.htm;
}
}
server {
listen 81;
server_name 192.168.25.141;
location / {
root html-81;
index index.html index.htm;
}
server {
listen 82;
server_name 192.168.25.141;
location / {
root html-82;
index index.html index.htm;
}
server {
listen 80;
server_name www.itma.com;
location / {
root html-www;
index index.html index.htm;
}
server {
listen 80;
server_name hehe.itma.com;
location / {
root html-hehe;
index index.html index.htm;
}