Commit a08de3bc authored by omega8cc's avatar omega8cc Committed by anarcat
Browse files

Cleaning trailing whitespaces in the Nginx config files.

parent 0111178c
......@@ -15,7 +15,7 @@
if ( $request_method !~ ^(?:GET|HEAD|POST)$ ) {
return 444;
}
###
### upload progress support
### http://drupal.org/project/filefield_nginx_progress
......@@ -37,7 +37,7 @@
access_log off;
try_files $uri @cache;
}
###
### deny listed requests for security reasons without 403 response
###
......@@ -51,7 +51,7 @@
location ~* ^/sites/.*/files/backup_migrate/ {
access_log off;
deny all;
}
}
###
### deny direct access to private downloads
......@@ -59,11 +59,11 @@
location ~* ^/sites/.*/private/ {
access_log off;
deny all;
}
}
###
### make css files compatible with boost caching - nginx 0.7.27 or newer required with try_files support
###
###
location ~* \.css$ {
if ( $request_method !~ ^(?:GET|HEAD)$ ) {
return 405;
......@@ -77,10 +77,10 @@
add_header X-Header "Boost Citrus 2.1";
try_files /cache/perm/$host${uri}_.css $uri =404;
}
###
### make js files compatible with boost caching - nginx 0.7.27 or newer required with try_files support
###
###
location ~* \.js$ {
if ( $request_method !~ ^(?:GET|HEAD)$ ) {
return 405;
......@@ -91,13 +91,13 @@
error_page 405 = @uncached;
access_log off;
expires max; # if using aggregator
add_header X-Header "Boost Citrus 2.2";
add_header X-Header "Boost Citrus 2.2";
try_files /cache/perm/$host${uri}_.js $uri =404;
}
###
### make json compatible with boost caching - nginx 0.7.27 or newer required with try_files support
###
###
location ~* \.json$ {
if ( $request_method !~ ^(?:GET|HEAD)$ ) {
return 405;
......@@ -108,13 +108,13 @@
error_page 405 = @uncached;
access_log off;
expires max; ### if using aggregator
add_header X-Header "Boost Citrus 2.3";
add_header X-Header "Boost Citrus 2.3";
try_files /cache/normal/$host${uri}_.json $uri =404;
}
###
### helper location to bypass boost static files cache for logged in users
###
###
location @uncached {
access_log off;
expires max; # max if using aggregator, otherwise sane expire time
......@@ -148,7 +148,7 @@
###
### serve & log bigger media/static/archive files directly, without all standard drupal rewrites, php-fpm etc.
###
###
location ~* ^.+\.(?:avi|mpe?g|mov|wmv|mp3|mp4|m4a|ogg|flv|wav|midi|zip|tar|t?gz|rar)$ {
expires 30d;
# allow files/downloads to be accessed without /sites/fqdn/
......@@ -159,7 +159,7 @@
###
### serve & no-log some static files as is, without forcing default_type
###
###
location ~* /(?:cross-?domain)\.xml$ {
access_log off;
expires 30d;
......@@ -178,7 +178,7 @@
###
### serve & no-log static helper files used in some wysiwyg editors
###
###
location ~* /(?:modules|libraries)/(?:tinybrowser|f?ckeditor|tinymce)/.*\.(?:html?|xml)$ {
access_log off;
expires 30d;
......@@ -194,7 +194,7 @@
###
### make feeds compatible with boost caching and set correct mime type - nginx 0.7.27 or newer required with try_files support
###
###
location ~* \.xml$ {
if ( $request_method !~ ^(?:GET|HEAD)$ ) {
return 405;
......@@ -215,7 +215,7 @@
###
### make feeds compatible with Boost caching and set correct mime type - nginx 0.7.27 or newer required with try_files support
###
###
location ~* /feed$ {
if ( $request_method !~ ^(?:GET|HEAD)$ ) {
return 405;
......@@ -227,7 +227,7 @@
access_log off;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT";
add_header Cache-Control "must-revalidate, post-check=0, pre-check=0";
add_header X-Header "Boost Citrus 2.5";
add_header X-Header "Boost Citrus 2.5";
charset utf-8;
types { }
default_type application/rss+xml;
......@@ -268,7 +268,7 @@
access_log off;
try_files $uri @cache;
}
###
### catch all unspecified requests
###
......@@ -287,9 +287,9 @@
return 405;
}
error_page 405 = @drupal;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT";
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT";
add_header Cache-Control "must-revalidate, post-check=0, pre-check=0";
add_header X-Header "Boost Citrus 1.9";
add_header X-Header "Boost Citrus 1.9";
charset utf-8;
try_files /cache/normal/$host${uri}_$args.html @drupal;
}
......@@ -303,7 +303,7 @@
###
### send all non-static requests to php-fpm, restricted to known php files
###
###
location ~* ^/(?:index|boost_stats|update|authorize|xmlrpc)\.php$ {
try_files $uri @drupal; ### check for existence of php file first
fastcgi_pass 127.0.0.1:9000; ### php-fpm listening on port 9000
......@@ -312,7 +312,7 @@
###
### deny access to any not listed above php files
###
###
location ~* ^.+\.php$ {
deny all;
}
......
......@@ -15,7 +15,7 @@
if ( $request_method !~ ^(?:GET|HEAD|POST)$ ) {
return 444;
}
###
### fix for Aegir & .info .pl domain ext
###
......@@ -23,7 +23,7 @@
access_log off;
try_files $uri @cache;
}
###
### deny listed requests for security reasons without 403 response
###
......@@ -37,7 +37,7 @@
location ~* ^/sites/.*/files/backup_migrate/ {
access_log off;
deny all;
}
}
###
### deny direct access to private downloads
......@@ -45,11 +45,11 @@
location ~* ^/sites/.*/private/ {
access_log off;
deny all;
}
}
###
### make css files compatible with boost caching - nginx 0.7.27 or newer required with try_files support
###
###
location ~* \.css$ {
if ( $request_method !~ ^(?:GET|HEAD)$ ) {
return 405;
......@@ -63,10 +63,10 @@
add_header X-Header "Boost Citrus 2.1";
try_files /cache/perm/$host${uri}_.css $uri =404;
}
###
### make js files compatible with boost caching - nginx 0.7.27 or newer required with try_files support
###
###
location ~* \.js$ {
if ( $request_method !~ ^(?:GET|HEAD)$ ) {
return 405;
......@@ -77,13 +77,13 @@
error_page 405 = @uncached;
access_log off;
expires max; # if using aggregator
add_header X-Header "Boost Citrus 2.2";
add_header X-Header "Boost Citrus 2.2";
try_files /cache/perm/$host${uri}_.js $uri =404;
}
###
### make json compatible with boost caching - nginx 0.7.27 or newer required with try_files support
###
###
location ~* \.json$ {
if ( $request_method !~ ^(?:GET|HEAD)$ ) {
return 405;
......@@ -94,13 +94,13 @@
error_page 405 = @uncached;
access_log off;
expires max; ### if using aggregator
add_header X-Header "Boost Citrus 2.3";
add_header X-Header "Boost Citrus 2.3";
try_files /cache/normal/$host${uri}_.json $uri =404;
}
###
### helper location to bypass boost static files cache for logged in users
###
###
location @uncached {
access_log off;
expires max; # max if using aggregator, otherwise sane expire time
......@@ -121,7 +121,7 @@
###
### serve & no-log static files & images directly, without all standard drupal rewrites, php-fpm etc.
###
###
location ~* ^.+\.(?:jpe?g|gif|png|ico|swf|pdf|doc|xls|tiff?|txt|cgi|bat|pl|dll|aspx?|exe|class)$ {
access_log off;
expires 30d;
......@@ -134,7 +134,7 @@
###
### serve & log bigger media/static/archive files directly, without all standard drupal rewrites, php-fpm etc.
###
###
location ~* ^.+\.(?:avi|mpe?g|mov|wmv|mp3|mp4|m4a|ogg|flv|wav|midi|zip|tar|t?gz|rar)$ {
expires 30d;
# allow files/downloads to be accessed without /sites/fqdn/
......@@ -145,7 +145,7 @@
###
### serve & no-log some static files as is, without forcing default_type
###
###
location ~* /(?:cross-?domain)\.xml$ {
access_log off;
expires 30d;
......@@ -164,7 +164,7 @@
###
### serve & no-log static helper files used in some wysiwyg editors
###
###
location ~* /(?:modules|libraries)/(?:tinybrowser|f?ckeditor|tinymce)/.*\.(?:html?|xml)$ {
access_log off;
expires 30d;
......@@ -180,7 +180,7 @@
###
### make feeds compatible with boost caching and set correct mime type - nginx 0.7.27 or newer required with try_files support
###
###
location ~* \.xml$ {
if ( $request_method !~ ^(?:GET|HEAD)$ ) {
return 405;
......@@ -201,7 +201,7 @@
###
### make feeds compatible with Boost caching and set correct mime type - nginx 0.7.27 or newer required with try_files support
###
###
location ~* /feed$ {
if ( $request_method !~ ^(?:GET|HEAD)$ ) {
return 405;
......@@ -213,7 +213,7 @@
access_log off;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT";
add_header Cache-Control "must-revalidate, post-check=0, pre-check=0";
add_header X-Header "Boost Citrus 2.5";
add_header X-Header "Boost Citrus 2.5";
charset utf-8;
types { }
default_type application/rss+xml;
......@@ -254,7 +254,7 @@
access_log off;
try_files $uri @cache;
}
###
### catch all unspecified requests
###
......@@ -273,9 +273,9 @@
return 405;
}
error_page 405 = @drupal;
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT";
add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT";
add_header Cache-Control "must-revalidate, post-check=0, pre-check=0";
add_header X-Header "Boost Citrus 1.9";
add_header X-Header "Boost Citrus 1.9";
charset utf-8;
try_files /cache/normal/$host${uri}_$args.html @drupal;
}
......@@ -289,7 +289,7 @@
###
### send all non-static requests to php-fpm, restricted to known php files
###
###
location ~* ^/(?:index|boost_stats|update|authorize|xmlrpc)\.php$ {
try_files $uri @drupal; ### check for existence of php file first
fastcgi_pass 127.0.0.1:9000; ### php-fpm listening on port 9000
......@@ -297,7 +297,7 @@
###
### deny access to any not listed above php files
###
###
location ~* ^.+\.php$ {
deny all;
}
......
......@@ -27,7 +27,7 @@
## Default index files
index index.php index.html;
## Size Limits
client_body_buffer_size 64k;
client_header_buffer_size 32k;
......@@ -43,8 +43,8 @@
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
## Timeouts
## Timeouts
client_body_timeout 60;
client_header_timeout 60;
send_timeout 60;
......@@ -55,18 +55,18 @@
fastcgi_read_timeout 300;
## Open File Performance
open_file_cache max=8000 inactive=30s;
open_file_cache_valid 60s;
open_file_cache max=8000 inactive=30s;
open_file_cache_valid 60s;
open_file_cache_min_uses 3;
open_file_cache_errors on;
## FastCGI Caching
fastcgi_cache_path /var/lib/nginx/speed
levels=2:2:2
keys_zone=speed:50m
inactive=8h
max_size=1g;
## General Options
ignore_invalid_headers on;
limit_zone gulag $binary_remote_addr 10m;
......@@ -74,13 +74,13 @@
reset_timedout_connection on;
fastcgi_intercept_errors on;
## TCP options
## TCP options
tcp_nopush on;
## SSL performance
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
## Compression
gzip_buffers 16 8k;
gzip_comp_level 5;
......@@ -110,7 +110,7 @@ if ($nginx_has_upload_progress) {
client_body_temp_path /var/lib/nginx/body 1 2;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log crit;
#######################################################
### nginx default server
......
......@@ -3,6 +3,6 @@ server {
server_name <?php print $this->uri . ' ' . implode(' ', $this->aliases); ?>;
root /var/www/nginx-default;
index index.html index.htm;
### Dont't reveal Aegir front-end URL here.
}
......@@ -24,7 +24,7 @@ class provisionService_http_nginx_ssl extends provisionService_http_ssl {
// We share the application name with nginx.
protected $application_name = 'nginx';
protected $has_restart_cmd = TRUE;
function default_restart_cmd() {
// The nginx service defines it's restart command as a static
// method so that we can make use of it here.
......
......@@ -15,7 +15,7 @@ server {
ssl_ciphers HIGH:!ADH:!MD5;
ssl_prefer_server_ciphers on;
keepalive_timeout 70;
### Dont't reveal Aegir front-end URL here.
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment