-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from devilbox/release-0.29
Via Header, client_max_body_size and worker_processes
- Loading branch information
Showing
3 changed files
with
93 additions
and
11 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# ================================================================================================= | ||
# MAIN SETTINGS | ||
# ================================================================================================= | ||
|
||
worker_processes auto; | ||
|
||
user nginx; | ||
daemon off; | ||
|
||
error_log /var/log/nginx/error.log warn; | ||
pid /var/run/nginx.pid; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
# ================================================================================================= | ||
# HTTPS SETTINGS | ||
# ================================================================================================= | ||
|
||
http { | ||
|
||
# ------------------------------------------------------------------------------- | ||
# NGINX DEFAULTS | ||
# ------------------------------------------------------------------------------- | ||
|
||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
|
||
|
||
# ------------------------------------------------------------------------------- | ||
# NGINX HEADER | ||
# ------------------------------------------------------------------------------- | ||
|
||
# Set valid Via header: <PROTOCOL_VERSION> <HOSTNAME> (<SERVER>/<SERVER_VERSION>) | ||
map $server_protocol $my_proto { | ||
"~^HTTP\/(?<version>[.0-9]+)$" $version; | ||
default $server_protocol; | ||
} | ||
add_header Via '$my_proto $hostname (nginx/$nginx_version)' always; | ||
|
||
|
||
# ------------------------------------------------------------------------------- | ||
# NGINX PERFORMANCE | ||
# ------------------------------------------------------------------------------- | ||
|
||
sendfile on; | ||
#tcp_nopush on; | ||
#aio on; | ||
#gzip on; | ||
|
||
|
||
# ------------------------------------------------------------------------------- | ||
# BUFFER SIZES | ||
# ------------------------------------------------------------------------------- | ||
|
||
# The maximum allowed size for a client request. If the maximum size is exceeded, | ||
# then Nginx will spit out a 413 error or Request Entity Too Large. | ||
# Setting size to 0 disables checking of client request body size. | ||
client_max_body_size 0; | ||
|
||
|
||
# ------------------------------------------------------------------------------- | ||
# TIMEOUTS | ||
# ------------------------------------------------------------------------------- | ||
|
||
keepalive_timeout 65; | ||
|
||
|
||
# ------------------------------------------------------------------------------- | ||
# INCLUDES | ||
# ------------------------------------------------------------------------------- | ||
|
||
include /etc/httpd-custom.d/*.conf; | ||
include /etc/httpd/conf.d/*.conf; | ||
include /etc/httpd/vhost.d/*.conf; | ||
} |