From 9c8145117972d92a68bcf4e2a73c17cc0300fcf0 Mon Sep 17 00:00:00 2001 From: joglomedia Date: Tue, 3 Dec 2019 21:12:24 +0700 Subject: [PATCH] changes vhost rules --- etc/nginx/vhost/site_codeigniter.conf | 1 - etc/nginx/vhost/site_default.conf | 2 +- etc/nginx/vhost/site_drupal.conf | 8 +++----- etc/nginx/vhost/site_laravel.conf | 5 +---- etc/nginx/vhost/site_roundcube.conf | 10 +--------- etc/nginx/vhost/site_sendy.conf | 6 +++--- etc/nginx/vhost/site_wordpress-bwps.conf | 2 +- etc/nginx/vhost/site_wordpress.conf | 2 +- 8 files changed, 11 insertions(+), 25 deletions(-) diff --git a/etc/nginx/vhost/site_codeigniter.conf b/etc/nginx/vhost/site_codeigniter.conf index dc9833a..878c1db 100644 --- a/etc/nginx/vhost/site_codeigniter.conf +++ b/etc/nginx/vhost/site_codeigniter.conf @@ -2,7 +2,6 @@ # Designed to be included in any server {} block. location / { - #index index.php index.html index.htm; try_files $uri $uri/ /index.php?$args; # Uncomment to enable naxsi on this location diff --git a/etc/nginx/vhost/site_default.conf b/etc/nginx/vhost/site_default.conf index 64eff53..3cd2105 100644 --- a/etc/nginx/vhost/site_default.conf +++ b/etc/nginx/vhost/site_default.conf @@ -1,4 +1,4 @@ -## Default rewrite rules. +## Default site rewrite rules. # Designed to be included in any server {} block. location / { diff --git a/etc/nginx/vhost/site_drupal.conf b/etc/nginx/vhost/site_drupal.conf index 4c32406..4d04bcf 100644 --- a/etc/nginx/vhost/site_drupal.conf +++ b/etc/nginx/vhost/site_drupal.conf @@ -1,11 +1,9 @@ -## Drupal site rules. +## Drupal rewrite rules. # Designed to be included in any server {} block. -# This order might seem weird - this is attempted to match last if rules below fail. -# http://wiki.nginx.org/HttpCoreModule location / { - # try_files $uri @rewrite; # For Drupal <= 6 - try_files $uri /index.php?$query_string; # For Drupal >= 7 + # try_files $uri $uri/ @rewrite; # For Drupal <= 6 + try_files $uri $uri/ /index.php?$query_string; # For Drupal >= 7 # Uncomment to enable naxsi on this location #include /etc/nginx/naxsi.rules diff --git a/etc/nginx/vhost/site_laravel.conf b/etc/nginx/vhost/site_laravel.conf index 50a925b..603b2dd 100644 --- a/etc/nginx/vhost/site_laravel.conf +++ b/etc/nginx/vhost/site_laravel.conf @@ -1,12 +1,9 @@ ## Laravel PHP Frameworks rewrite rules. # Designed to be included in any server {} block. -# This order might seem weird - this is attempted to match last if rules below fail. -# http://wiki.nginx.org/HttpCoreModule - location / { # try to serve file directly, fallback to index.php - try_files $uri $uri/ /index.php?$query_string; + try_files $uri $uri/ /index.php?$query_string; # Uncomment to enable naxsi on this location #include /etc/nginx/naxsi.rules diff --git a/etc/nginx/vhost/site_roundcube.conf b/etc/nginx/vhost/site_roundcube.conf index e3054c8..10a6260 100644 --- a/etc/nginx/vhost/site_roundcube.conf +++ b/etc/nginx/vhost/site_roundcube.conf @@ -1,4 +1,4 @@ -## Roundcube webmail site rules. +## Roundcube webmail rewrite rules. # Designed to be included in any server {} block. location / { @@ -16,11 +16,3 @@ location / { # Shows file listing times as local time. #autoindex_localtime on; } - -location ~ ^/(README|README.md|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ { - deny all; -} - -location ~ ^/(bin|SQL)/ { - deny all; -} diff --git a/etc/nginx/vhost/site_sendy.conf b/etc/nginx/vhost/site_sendy.conf index 7e55d63..c847ab4 100644 --- a/etc/nginx/vhost/site_sendy.conf +++ b/etc/nginx/vhost/site_sendy.conf @@ -1,6 +1,8 @@ -## Sendy.co site rules. +## Sendy.co rewrite rules. # Designed to be included in any server {} block. +add_header X-Robots-Tag "noindex, noarchive"; + #try_files $uri $uri/ @rewrite; #location @rewrite { @@ -27,5 +29,3 @@ location / { location ~ ^\/(l|t|w|confirm|(un)?subscribe)\/ { rewrite ^\/([^/]+)\/(.+)$ "/$1.php?i=$2" last; } - -add_header X-Robots-Tag "noindex, noarchive"; diff --git a/etc/nginx/vhost/site_wordpress-bwps.conf b/etc/nginx/vhost/site_wordpress-bwps.conf index a69e627..75aad7c 100644 --- a/etc/nginx/vhost/site_wordpress-bwps.conf +++ b/etc/nginx/vhost/site_wordpress-bwps.conf @@ -1,4 +1,4 @@ -## WP + BWPS plugin rules. +## WP + BWPS plugin rewrite rules. # Designed to be included in any server {} block. # Include Wordpress single-site configuration. diff --git a/etc/nginx/vhost/site_wordpress.conf b/etc/nginx/vhost/site_wordpress.conf index 07e6ab2..6e1681e 100644 --- a/etc/nginx/vhost/site_wordpress.conf +++ b/etc/nginx/vhost/site_wordpress.conf @@ -1,4 +1,4 @@ -## WordPress singlesite rules. +## WordPress rewrite rules. # Designed to be included in any server {} block. location / {