Last active
November 24, 2020 21:01
-
-
Save vavrecan/58ad6d5714a8a96a0611ccacc2953f31 to your computer and use it in GitHub Desktop.
Server setup 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/security/limits.conf | |
#<user> <type> <item> <value> | |
* soft nofile 1048576 | |
* hard nofile 1048576 | |
root soft nofile 1048576 | |
root hard nofile 1048576 | |
/etc/sysctl.conf | |
net.ipv4.ip_local_port_range = 12000 65535 | |
fs.file-max = 1048576 | |
ps auxf | grep nginx | |
cat /proc/1167/limits | grep "open files" | |
nginx.conf | |
user www-data; | |
worker_processes auto; | |
pid /run/nginx.pid; | |
include /etc/nginx/modules-enabled/*.conf; | |
worker_rlimit_nofile 1048576; | |
events { | |
worker_connections 8000; | |
multi_accept on; | |
} | |
http { | |
## | |
# Basic Settings | |
## | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 65; | |
types_hash_max_size 2048; | |
server_tokens off; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment