forked from spinupwp/wordpress-nginx
-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.conf
58 lines (44 loc) · 1.55 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# The user account used by the worker processes. If following along with Hosting WordPress Yourself,
# it's recommened to set this to your username, but only when running a single user access server.
# https://deliciousbrains.com/hosting-wordpress-yourself-nginx-php-mysql/
user www-data;
# Set to number of CPU cores, auto will try to autodetect.
worker_processes auto;
# Maximum open file descriptors per process. Should be greater than worker_connections.
worker_rlimit_nofile 8192;
# File that stores the process ID. Rarely needs changing.
pid /run/nginx.pid;
events {
# Set the maximum number of connection each worker process can open. Anything higher than this
# will require Unix optimisations.
worker_connections 8000;
# Accept all new connections as they're opened.
multi_accept on;
}
http {
# HTTP
include global/http.conf;
# MIME Types
include global/mime-types.conf;
default_type application/octet-stream;
# Limits & Timeouts
include global/limits.conf;
# Some WP plugins that push large amounts of data via cookies
# can cause 500 HTTP errors if these values aren't increased.
# buffer setting example for preventing 502 errors:
# fastcgi_buffers 4 256k;
# fastcgi_buffer_size 256k;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
# Default Logs
error_log /var/log/nginx/error.log warn;
access_log /var/log/nginx/access.log;
# Gzip
include global/gzip.conf;
# exposes configured php pool on $upstream variable
include global/php-pool.conf;
# Modules
include /etc/nginx/conf.d/*.conf;
# Sites
include /etc/nginx/sites-enabled/*;
}