Bootstrap

Nginx配置基于端口的 Web 服务器

Nginx配置基于端口的 Web 服务器

1.vim  9091.conf
内容如下:
server{
server_name _;
listen 9091;
root /var/www/9091/;
access_log /var/log/nginx/9091/access.log;
error_log /var/log/nginx/9091/error.log;
}
2.vim 9092.conf
内容如下:
server{
server_name  _;
listen 9092;
root /var/9092/;
access.log /var/log/nginx/9092/access.log;
error_log /var/log/nginx/9092/error.log;
}
mkdir -p /var/www/9091
echo 9091 > /var/www/9091/index.html
mkdir /var/log/nginx/9091/
mkdir /var/9092
echo 9092 > /var/9092/index.html
mkdir /var/log/nginx/9092/
;