From 1a8b37e41ba0173ea85898597b585c8d886b0821 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Wed, 27 Mar 2019 13:44:18 +0100 Subject: [PATCH] fix missing git init --- README.md | 10 +++++----- etc/nginx/common/locations-php7.conf | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c95d669..a911fd3 100644 --- a/README.md +++ b/README.md @@ -303,7 +303,7 @@ Then you can check php version with command `php -v` cp -rf $HOME/ubuntu-nginx-web-server/etc/nginx/conf.d/* /etc/nginx/conf.d/ # commit change with git -git -C /etc/nginx/ add /etc/nginx/ && git -C /etc/nginx/ commit -m "update conf.d configurations" +git -C /etc/nginx init && git -C /etc/nginx/ add . && git -C /etc/nginx/ commit -m "update conf.d configurations" ``` ### WO common configuration @@ -314,7 +314,7 @@ git -C /etc/nginx/ add /etc/nginx/ && git -C /etc/nginx/ commit -m "update conf. cp -rf $HOME/ubuntu-nginx-web-server/etc/nginx/common/* /etc/nginx/common/ # commit change with git -git -C /etc/nginx/ add /etc/nginx/ && git -C /etc/nginx/ commit -m "update common configurations" +git -C /etc/nginx/ add . && git -C /etc/nginx/ commit -m "update common configurations" ``` ### Compile the latest Nginx release with [nginx-ee](https://github.com/VirtuBox/nginx-ee) @@ -344,7 +344,7 @@ cp -f $HOME/ubuntu-nginx-web-server/etc/nginx/nginx.conf /etc/nginx/nginx-tlsv12 ```bash # commit change with git -git -C /etc/nginx/ add /etc/nginx/ && git -C /etc/nginx/ commit -m "update nginx.conf configurations" +git -C /etc/nginx/ add . && git -C /etc/nginx/ commit -m "update nginx.conf configurations" ``` ### Nginx configuration for netdata @@ -354,7 +354,7 @@ git -C /etc/nginx/ add /etc/nginx/ && git -C /etc/nginx/ commit -m "update nginx cp -f $HOME/ubuntu-nginx-web-server/etc/nginx/sites-available/22222 /etc/nginx/sites-available/22222 # commit change with git -git -C /etc/nginx/ add /etc/nginx/ && git -C /etc/nginx/ commit -m "update 22222 configuration" +git -C /etc/nginx/ add . && git -C /etc/nginx/ commit -m "update 22222 configuration" ``` #### Increase Nginx open files limits @@ -375,7 +375,7 @@ sudo systemctl restart nginx.service WARNING : SSH Configuration with root login allowed using SSH keys only [source](https://github.com/VirtuBox/ubuntu-nginx-web-server/blob/master/etc/ssh/sshd_config) -``` +```bash cp -f $HOME/ubuntu-nginx-web-server/etc/ssh/sshd_config /etc/ssh/sshd_config ``` diff --git a/etc/nginx/common/locations-php7.conf b/etc/nginx/common/locations-php7.conf index 43dc5ad..23a2339 100644 --- a/etc/nginx/common/locations-php7.conf +++ b/etc/nginx/common/locations-php7.conf @@ -15,7 +15,7 @@ location @empty { location = /robots.txt { # Some WordPress plugin gererate robots.txt file # Refer #340 issue - try_files $uri $uri/ /index.php?$args @robots; + try_files $uri $uri/ /index.php$is_args$args @robots; access_log off; log_not_found off; } @@ -107,10 +107,10 @@ location ~ "(~|`|<|>|:|;|%|\\|\s|\{|\}|\[|\]|\|)" { location ~* "/(=|\$&|_mm|(wp-)?config\.|cgi-|etc/passwd|muieblack)" { deny all; } -location ~* "(&pws=0|_vti_|\(null\)|\{\$itemURL\}|echo(.*)kae|etc/passwd|eval\(|self/environ)" { +location ~* "(&pws=0|_vti_|\(null\)|\{\$itemURL\}|echo(.*)kae|eval\(|self/environ)" { deny all; } -location ~* "/(^$|mobiquo|phpinfo|shell|sqlpatch|thumb|thumb_editor|thumbopen|timthumb|webshell|config|configuration)\.php" { +location ~* "/(^$|mobiquo|phpinfo|shell|sqlpatch||webshell|config|configuration|info)\.php" { deny all; }