我正在使用nginx代理的django应用程序。在我的应用程序中,我需要能够更改系统日期,但是nginx总是会抛出504网关超时,因为它不会重新启动初始化会话时间。
任何人都可以告诉我如何禁用nginx连接超时?
这是我的nginx配置文件:
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
#Added by Denis
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
fastcgi_connect_timeout 31536000;
fastcgi_send_timeout 31536000;
fastcgi_read_timeout 31536000;
max_execution_time 31536000;
proxy_connect_timeout 31536000;
proxy_send_timeout 31536000;
proxy_read_timeout 31536000;
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 31536000;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/java$
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}