nginx 监听多个端口 80和81
程序员文章站
2022-05-22 10:36:51
...
在
nginx.conf
中配置两个server即可:http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
upstream localhost {
server127.0.0.1:8080 max_fails=7 fail_timeout=7s;
}
server {
listen 81;
server_name localhost;
location / {
root html;
indexindex.html index.htm;
proxy_pass http://localhost;
}
}
server {
listen 80;
server_name localhost;
#charset koi8-r;#access_log logs/host.access.log main; location / {
root html;
indexindex.html index.htm;
proxy_pass http://localhost;
}
}
}
').addClass('pre-numbering').hide();
$(this).addClass('has-numbering').parent().append($numbering);
for (i = 1; i ').text(i));
};
$numbering.fadeIn(1700);
});
});
以上就介绍了nginx 监听多个端口 80和81,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
上一篇: linux安装多个MYSQL实例
下一篇: PHP生成器的功能与用法详解