时间:2021-07-01 10:21:17 帮助过:4人阅读
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 <= lines; i++) {
$numbering.append($('').text(i));
};
$numbering.fadeIn(1700);
});
});
以上就介绍了nginx 监听多个端口 80和81,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。