C
C
Chvalov2018-06-22 00:20:32
Nginx
Chvalov, 2018-06-22 00:20:32

Will such nginx config work correctly?

Will such nginx config work correctly/stably?

user  www-data;
worker_processes  auto;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
        use epoll;
        worker_connections  2048;
        multi_accept on;
        accept_mutex off;
}

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 off;

        sendfile        on;
        sendfile_max_chunk 512k;
        tcp_nopush      on;
        tcp_nodelay     on;

        keepalive_timeout  20;
        keepalive_requests 100;
        client_header_timeout 10;
        client_body_timeout 10;
        reset_timedout_connection on;
        send_timeout 2;

        charset UTF-8;
        server_tokens off;

        gzip  on;
        gzip_buffers 64 8k;
        gzip_static on;
        gzip_comp_level 3;
        gzip_min_length     1000;
        gzip_http_version 1.1;
        gzip_proxied any;
        gzip_disable "msie6";
        gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;

        open_file_cache max=65000 inactive=20s;
        open_file_cache_valid 30s;
        open_file_cache_min_uses 2;
        open_file_cache_errors on;

        include /etc/nginx/conf.d/*.conf;
}

Perhaps there are parameters that contradict one to the other?
Server Options
OS: Debian 9 x64
RAM: 32Gb
CPU: Intel(R) Xeon(R) CPU E3-1245 V2 @ 3.40GHz

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly, 2018-06-22
@trofimovdev

Everything seems to be ok.
And for the future, nginx -tto help you :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question