开放80,81端口
firewall-cmd --add-port=80/tcp --permanent
firewall-cmd --add-port=81/tcp --permanent
firewall-cmd --reload
配置nginx
在html下新建文件夹duankou1,duankou2
vim nginx
server {
listen 81;
server_name localhost;
location / {
root html/duankou1;
index index.html index.htm;
}
}
server {
listen 80;
server_name localhost;
location / {
root html/duankou2;
index index.html index.htm;
}