- 端口綁定
#端口綁定
server {
listen 81;
server_name localhost;
location / {
root cart;
index cart.html;
}
}
server {
listen 82;
server_name localhost;
location / {
root search;
index search.html;
}
}
2. 域名綁定
#域名綁定
server {
listen 80;
server_name cart.pinyougou.com;
location / {
root cart;
index cart.html;
}
}
server {
listen 80;
server_name search.pinyougou.com;
location / {
root search;
index search.html;
}
}