Answer the question
In order to leave comments, you need to log in
Why does nginx static slow down through the second interface?
Good day!
I'm an amateur, so don't kick me.
There is one server on two networks. The server distributes package repositories (deb) via http over two interfaces.
In the same network, clients are updated without delay, i.e. the "apt update" command on the client works out instantly, and on the other, after entering this command, 40-45 seconds pass, and only after that the update occurs.
Why?
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
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 /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
server {
location / {
root /mnt/hd/repo;
autoindex on;
}
}
Answer the question
In order to leave comments, you need to log in
apt -o Acquire::EnableSrvRecords=false update
Opened on a foreign forum. With this "hat" everything is updated without delay. Why?
Try increasing the number of workers in the main config. It is recommended to set the same number of processor cores.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question