Last active
January 15, 2018 03:00
-
-
Save StevenJL/0893053f2812adb5b4f4f25f1bcf52a8 to your computer and use it in GitHub Desktop.
Static Nginx Configuration
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
# The error_log directive sets the location of the nginx error | |
# log as well as the security level. | |
error_log /var/log/nginx/error.log warn; | |
# Specifies the number of worker processes spawned by the master | |
# process. It's these worker processes that listen to sockets and | |
# accepts the incoming connections. Should be set equal to the | |
# number of cores on the machine. | |
worker_processes 8; | |
# The events block configures the connection process parameters. The nested | |
# epoll directive tells nginx to use the epoll processing method based on the | |
# Linux 2.6+ epoll system call for responding to incoming connections. The | |
# worker_connections directive tells nginx to allocate memory for up to | |
# 1024 connections for each worker process. | |
events { | |
use epoll; | |
worker_connections 1024; | |
} | |
# The `http` block configures http/https service | |
http { | |
# The `include` directive will take all the directives in | |
# the given file and place them here. In this case, it’s | |
# the “mime.types” file in the same directory as this file, | |
# which contains a mapping of file extensions to MIME types. | |
include mime.types; | |
# `default_type` sets the default MIME type as application/octet-stream | |
# which is basically binary data. | |
default_type application/octet-stream; | |
# We again use the `include` directive to take all directives in | |
# the *.conf files in the "sites-enabled" directory. The convention | |
# is that each virtual host should correspond to one file in the | |
# "sites-enabled" directory. | |
include /etc/nginx/site-enabled/*.conf; | |
} | |
# vim: ft=nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment