我正在寻找一种设置,该设置会影响为一个用户运行多个nginx进程的能力。当前,如果管理员执行长时间的操作(上传多个文件),则不可能在另一个选项卡中打开页面-页面正在等待第一个选项卡结束。
这是我的docker-compose
version: "3.1"
services:
webserver:
image: nginx:alpine
volumes:
- .:/application
- ./nginx/nginx_all.conf:/etc/nginx/nginx.conf
这是nginx_all.conf
user nginx;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/stdout main;
#sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
gzip on;
server {
# limit_conn conn_limit_per_ip 10;
# limit_req zone=req_limit_per_ip burst=10 nodelay;
fastcgi_keep_conn on;
#proxy_buffering off;
gzip off;
listen 80 default;
client_max_body_size 208M;
access_log /var/log/nginx/application.access.log;
root /application/public;
rewrite ^/index\.php/?(.*)$ /$1 permanent;
try_files $uri @rewriteapp;
location @rewriteapp {
rewrite ^(.*)$ /index.php/$1 last;
}
# Deny all . files
location ~ /\. {
deny all;
}
location ~ ^/(index)\.php(/|$) {
fastcgi_pass php-fpm:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_index app_dev.php;
send_timeout 1800;
fastcgi_read_timeout 1800;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log";
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
include fastcgi_params;
}
# Statics
location /(bundles|media) {
access_log off;
expires 30d;
try_files $uri @rewriteapp;
}}
}
我尝试更改-worker_processes 1;到worker_processes 2; -但这不会改变行为。