Created
January 10, 2020 14:22
-
-
Save gandroz/6d550541ad004f2dc5367003e4624466 to your computer and use it in GitHub Desktop.
Nginx configuration file
This file contains 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
# Define the user that will own and run the Nginx server | |
user nginx; | |
# Define the number of worker processes; recommended value is the number of | |
# cores that are being used by your server | |
worker_processes 1; | |
# Define the location on the file system of the error log, plus the minimum | |
# severity to log messages for | |
error_log /var/log/nginx/error.log warn; | |
# Define the file that will store the process ID of the main NGINX process | |
pid /var/run/nginx.pid; | |
# events block defines the parameters that affect connection processing. | |
events { | |
# Define the maximum number of simultaneous connections that can be opened by a worker process | |
worker_connections 1024; | |
} | |
# http block defines the parameters for how NGINX should handle HTTP web traffic | |
http { | |
# Include the file defining the list of file types that are supported by NGINX | |
include /etc/nginx/mime.types; | |
# Define the default file type that is returned to the user | |
default_type text/html; | |
# Define the format of log messages. | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for"'; | |
# Define the location of the log of access attempts to NGINX | |
access_log /var/log/nginx/access.log main; | |
# Define the parameters to optimize the delivery of static content | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
# Define the timeout value for keep-alive connections with the client | |
keepalive_timeout 65; | |
# Define the usage of the gzip compression algorithm to reduce the amount of data to transmit | |
#gzip on; | |
# Include additional parameters for virtual host(s)/server(s) | |
include /etc/nginx/sites-enabled/*.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment