- 端口绑定
#端口绑定
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;
}
}