user nonroot; worker_processes auto; worker_cpu_affinity auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { worker_connections 4096; multi_accept on; } http { ## # Basic Settings ## charset utf-8; source_charset utf-8; sendfile on; tcp_nopush on; tcp_nodelay on; server_tokens off; server_name_in_redirect off; ignore_invalid_headers on; recursive_error_pages on; types_hash_max_size 4096; keepalive_timeout 65; client_max_body_size 150m; ssl_protocols TLSv1.3 TLSv1.2; ssl_ciphers TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS_AES_256_GCM_SHA384:TLS-AES-256-GCM-SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS-CHACHA20-POLY1305-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305; ssl_ecdh_curve secp521r1:secp384r1; ssl_prefer_server_ciphers on; ssl_dhparam /etc/nginx/dhparam.pem; ssl_buffer_size 4k; ssl_session_cache shared:SSL:10m; ssl_session_timeout 60m; ssl_session_tickets off; ssl_stapling on; ssl_stapling_verify on; resolver 1.1.1.1 1.0.0.1 [2606:4700:4700::1111] [2606:4700:4700::1001] valid=300s; resolver_timeout 5s; include /etc/nginx/mime.types; default_type application/octet-stream; fastcgi_buffers 8 16k; fastcgi_buffer_size 32k; fastcgi_index index.php; ## # Logging Settings ## #the nginx file is just uploaded for the purpose of showing what the logging format is log_format main '[$time_local] $remote_addr ' 'status code: $status body bytes: $body_bytes_sent bytes: $bytes_sent ' 'user agent: "$http_user_agent" x forwarded: "$http_x_forwarded_for" request length: $request_length request_time: $request_time' ' request: $request ssl_protocol: $ssl_protocol ssl_cipher: $ssl_cipher'; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; log_not_found off; ## # Gzip Settings ## gzip on; gzip_http_version 1.1; gzip_vary on; gzip_comp_level 6; gzip_proxied any; gzip_types application/atom+xml application/javascript application/json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/x-httpd-php application/xhtml+xml application/xml application/xml+rss font/opentype image/svg+xml image/x-icon text/css text/plain text/xml; gzip_buffers 16 8k; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; #fancyindex_localtime on; #fancyindex_exact_size off; #fancyindex_name_length 100; ## # Cloudflare ## set_real_ip_from 103.21.244.0/22; set_real_ip_from 103.22.200.0/22; set_real_ip_from 103.31.4.0/22; set_real_ip_from 104.16.0.0/12; set_real_ip_from 108.162.192.0/18; set_real_ip_from 141.101.64.0/18; set_real_ip_from 162.158.0.0/15; set_real_ip_from 172.64.0.0/13; set_real_ip_from 173.245.48.0/20; set_real_ip_from 188.114.96.0/20; set_real_ip_from 190.93.240.0/20; set_real_ip_from 197.234.240.0/22; set_real_ip_from 198.41.128.0/17; set_real_ip_from 199.27.128.0/21; set_real_ip_from 2400:cb00::/32; set_real_ip_from 2405:8100::/32; set_real_ip_from 2405:b500::/32; set_real_ip_from 2606:4700::/32; set_real_ip_from 2803:f800::/32; real_ip_header CF-Connecting-IP; ## # GeoIP ## geoip_country /usr/share/GeoIP/GeoIP.dat; ## # Virtual Host Configs ## include /etc/nginx/sites-enabled/default; include /etc/nginx/sites/*.conf; }