DEV Community

Slava Borodulin
Slava Borodulin

Posted on • Updated on


Boost NGINX for cheap VPS

user www-data;
worker_processes 2;
worker_rlimit_nofile 2048;

events {
    worker_connections 1024;
    use epoll;
    multi_accept on;

http {
    include /etc/nginx/mime.types;
    default_type application/octet-stream;

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

    log_format main '$remote_addr $msec $remote_user [$time_local] '
                        '"$request" $status $request_time $body_bytes_sent '
                        '"$http_referer" "$http_user_agent"';

    #access_log /dev/stdout;
    access_log off;
    error_log off;
    #error_log /var/log/nginx/error.log;

    client_body_buffer_size 128k;
    client_header_buffer_size 1k;
    client_max_body_size 8m;
    large_client_header_buffers 4 256k;
    client_body_timeout 10;
    client_header_timeout 12;
    keepalive_timeout 30;
    keepalive_requests 500;
    reset_timedout_connection on;
    send_timeout 2;

    sendfile on;

    tcp_nopush on;
    tcp_nodelay on;
    server_tokens off;

    gzip on;
    gzip_min_length 10240;
    gzip_proxied any;
    gzip_comp_level 4;
    gzip_types text/css application/javascript image/svg+xml text/plain application/json;

    charset utf-8;

    limit_conn_status 429;
    limit_req_status 429;

    include /etc/nginx/sites-enabled/*;

Enter fullscreen mode Exit fullscreen mode

Top comments (0)

The AI Brief

AI generated git commit messages

Minimize the struggle of remembering what you just coded. AI-generated commits make it easier to manage projects and keep track of changes. The Nutlope/aicommits project demonstrates how AI can improve commit messages.

I open sourced an AI that creates any UI in seconds

Make AI-generated user interfaces a breeze. This open-source project harnesses the power of generative AI technologies like chatGPT to create versatile, quick, and intuitive UI components.

Use AI to commit like a PRO in 1 second

Upgrade your commit message game with AI. Boost your productivity by using ChatGPT to generate commit messages and avoid context switching. OpenCommit is an open-source library that helps you achieve this easily.

Build your own ChatGPT starter kit

Train AI models on custom data for improved domain-specific knowledge. Combine the power of WebView technologies and this starter kit to train your ChatGPT model on specific websites, allowing for better-optimized outcomes.