-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
48206b2
commit f8c1586
Showing
2 changed files
with
123 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#! --------------------------------------------------------------------------------------------------------------------- | ||
# This file is part of fleshgrinder/nginx-configuration. | ||
# | ||
# fleshgrinder/nginx-configuration is free software: you can redistribute it and/or modify it under the terms of the GNU | ||
# Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at | ||
# your option) any later version. | ||
# | ||
# fleshgrinder/nginx-configuration is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without | ||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
# License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License along with fleshgrinder/nginx-configuration. | ||
# If not, see <https://www.gnu.org/licenses/agpl-3.0.html>. | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
|
||
# ---------------------------------------------------------------------------------------------------------------------- | ||
# Main nginx configuration. | ||
# | ||
# Please create a copy of this file at `/nginx.conf` and perform your changes there. | ||
# | ||
# @author Richard Fussenegger <richard@fussenegger.info> | ||
# @copyright 2015 (c) Richard Fussenegger | ||
# @license https://www.gnu.org/licenses/agpl-3.0.html AGPLv3 | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
|
||
pcre_jit on; | ||
timer_resolution 1s; | ||
worker_processes auto; | ||
worker_priority 15; | ||
worker_rlimit_core 0; | ||
worker_rlimit_nofile 262144; | ||
|
||
events { | ||
accept_mutex on; | ||
accept_mutex_delay 50ms; | ||
multi_accept on; | ||
worker_connections 131072; | ||
} | ||
|
||
http { | ||
charset utf-8; | ||
client_body_timeout 3s; | ||
client_header_timeout 3s; | ||
client_max_body_size 16m; | ||
default_type application/octet-stream; | ||
ignore_invalid_headers on; | ||
include includes/fastcgi-microcache-path.ngx; | ||
include includes/gzip.ngx; | ||
include includes/headers.ngx; | ||
include includes/https-spdy.ngx; | ||
include includes/https.ngx; | ||
include includes/mime-types.ngx; | ||
include includes/php-fpm-unix-socket-upstream.ngx; | ||
index index.html index.htm; | ||
keepalive_disable none; | ||
keepalive_requests 50; | ||
keepalive_timeout 120s; | ||
max_ranges 0; | ||
msie_padding off; | ||
postpone_output 1440; | ||
recursive_error_pages on; | ||
reset_timedout_connection on; | ||
send_timeout 9s; | ||
server_name_in_redirect off; | ||
server_names_hash_bucket_size 64; | ||
server_tokens off; | ||
types_hash_max_size 2048; | ||
uninitialized_variable_warn off; | ||
|
||
include sites/*.ngx; | ||
include sites/*/*.ngx; | ||
} |
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,51 @@ | ||
#! --------------------------------------------------------------------------------------------------------------------- | ||
# This file is part of fleshgrinder/nginx-configuration. | ||
# | ||
# fleshgrinder/nginx-configuration is free software: you can redistribute it and/or modify it under the terms of the GNU | ||
# Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at | ||
# your option) any later version. | ||
# | ||
# fleshgrinder/nginx-configuration is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without | ||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
# License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License along with fleshgrinder/nginx-configuration. | ||
# If not, see <https://www.gnu.org/licenses/agpl-3.0.html>. | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
|
||
# ---------------------------------------------------------------------------------------------------------------------- | ||
# Example configuration for a Drupal website. | ||
# | ||
# @author Richard Fussenegger <richard@fussenegger.info> | ||
# @copyright 2015 (c) Richard Fussenegger | ||
# @license https://www.gnu.org/licenses/agpl-3.0.html AGPLv3 | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
|
||
server { | ||
set $usr_domain example.com; | ||
listen [::]:80; | ||
server_name $usr_domain *.$usr_domain; | ||
|
||
return 301 $scheme://www.$usr_domain$request_uri; | ||
} | ||
|
||
server { | ||
set $usr_domain example.com; | ||
listen [::]:80; | ||
server_name www.$usr_domain; | ||
root /var/www/$usr_domain/www; | ||
|
||
# Enable PHP support per server and not globally. | ||
include includes/php-fpm.ngx; | ||
index index.php; | ||
|
||
location / { | ||
include includes/protect-system-files.ngx; | ||
include includes/fs-aio.ngx; | ||
include includes/static-files.ngx; | ||
include includes/fastcgi-microcache.ngx; | ||
include includes/php-fpm-drupal.ngx; | ||
#include includes/php-fpm-tcp-upstream.ngx; | ||
include includes/php-fpm-unix-socket-upstream.ngx; | ||
} | ||
} |