On a FreeBSD machine, I have a super-simple Nginx conf file (nginx/1.8.1):
server {
server_name .domain1.com;
listen 80 accept_filter=httpready;
index index.html;
location / {
root /home/www1;
}
}
server {
server_name domain2.com;
listen 80 default_server accept_filter=httpready;
index index.htm;
location / {
root /home/www2;
}
}
This works if I only have accept_filter=httpready
enabled for one of the servers. But as it is written above, it fails, with
nginx: [emerg] duplicate listen options for 0.0.0.0:80
Why can't I set accept_filter=httpready
for both servers?
答案 0 :(得分:2)
def create_java_object(numpy_matrix): header = array.array('i', list(numpy_matrix.shape)) body = array.array('i', numpy_matrix.flatten().tolist()); if sys.byteorder != 'big': header.byteswap() body.byteswap() buf = bytearray(header.tostring() + body.tostring()) return java_instance.jvm.my.namespace.MyClass.createFromPy4j(buf)
指令可以有几个特定于与套接字相关的系统调用的附加参数。这些参数可以在任何listen
指令中指定,但对于给定的listen
对,只能 。
因此,您应该只使用address:port
一次,但它对于收听同一accept_filter=httpready
的所有服务器块都有效。