diff --git a/config/nginx/common/acl.conf b/config/nginx/common/acl.conf index 2cc9f84f..7549293b 100644 --- a/config/nginx/common/acl.conf +++ b/config/nginx/common/acl.conf @@ -1,4 +1,6 @@ -# Protect Locations Using HTTP AUTH OR IP-Based Authentication +# EasyEngine (ee) protect locations using +# HTTP authentication || IP address + satisfy any; auth_basic "Restricted Area"; auth_basic_user_file htpasswd-ee; diff --git a/config/nginx/common/locations.conf b/config/nginx/common/locations.conf index c1ee5781..39912026 100644 --- a/config/nginx/common/locations.conf +++ b/config/nginx/common/locations.conf @@ -1,8 +1,7 @@ -# DO NOT MODIFIED ALL CHNAGES LOST AFTER UPDATE EasyEngine -# Common Locations +# DO NOT MODIFIED ALL CHNAGES LOST AFTER UPDATE EasyEngine (ee) -# Basic Locations Files +# Basic locations files location = /favicon.ico { access_log off; log_not_found off; @@ -14,7 +13,7 @@ location = /robots.txt { log_not_found off; } -# Cache Static Files For As Long As Possible +# Cache static files location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|swf)$ { access_log off; log_not_found off; @@ -22,29 +21,29 @@ location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gi } -# Security Settings For Better Privacy +# Security settings for better privacy -# Deny Hidden Files +# Deny hidden files location ~ /\. { deny all; access_log off; log_not_found off; } -# Deny Backup Extensions & Log Files +# Deny backup extensions & log files location ~* ^.+\.(bak|log|old|orig|original|php#|php~|php_bak|save|swo|swp)$ { deny all; access_log off; log_not_found off; } -# Return 403 Forbidden For readme.(txt|html) or license.(txt|html) +# Return 403 forbidden for readme.(txt|html) or license.(txt|html) if ($request_uri ~* "^.+(readme|license)\.(txt|html)$") { return 403; } -# Status Pages +# Status pages location /nginx_status { stub_status on; access_log off; @@ -58,9 +57,9 @@ location ~ ^/(status|ping) { } -# EasyEngine Admin Tools +# EasyEngine (ee) utilities -# PMA Settings +# phpMyAdmin settings location /pma { return 301 https://$host:22222/db/pma; } @@ -73,7 +72,7 @@ location /phpmyadmin { return 301 https://$host:22222/db/pma; } -# Adminer Settings +# Adminer settings location /adminer { return 301 https://$host:22222/db/adminer; } diff --git a/config/nginx/common/w3tc.conf b/config/nginx/common/w3tc.conf index 67e91591..1853943a 100644 --- a/config/nginx/common/w3tc.conf +++ b/config/nginx/common/w3tc.conf @@ -2,7 +2,7 @@ set $cache_uri $request_uri; -# POST Requests And Urls With A Query String Should Always Go To PHP +# POST requests and URL with a query string should always go to php if ($request_method = POST) { set $cache_uri 'null cache'; } @@ -11,17 +11,17 @@ if ($query_string != "") { set $cache_uri 'null cache'; } -# Don't Cache Uris Containing The Following Segments +# Don't cache URL containing the following segments if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|wp-.*.php|index.php|/feed/|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") { set $cache_uri 'null cache'; } -# Don't Use The Cache For Logged In Users Or Recent Commenters +# Don't use the cache for logged in users or recent commenter if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") { set $cache_uri 'null cache'; } -# Use Cached Or Actual File If They Exists, Otherwise Pass Request To WordPress +# Use cached or actual file if they exists, Otherwise pass request to WordPress location / { try_files /wp-content/cache/page_enhanced/${host}${cache_uri}_index.html $uri $uri/ /index.php?$args; } diff --git a/config/nginx/common/wpcommon.conf b/config/nginx/common/wpcommon.conf index 8dffc405..2df3d965 100644 --- a/config/nginx/common/wpcommon.conf +++ b/config/nginx/common/wpcommon.conf @@ -1,8 +1,8 @@ -# DO NOT MODIFIED ALL CHNAGES LOST AFTER UPDATE EasyEngine -# WordPress Common Settings +# DO NOT MODIFIED ALL CHNAGES LOST AFTER UPDATE EasyEngine (ee) +# WordPress common settings -# Limit Access To Avoid Brute Force Attack +# Limit access to avoid brute force attack location = /wp-login.php { limit_req zone=one burst=1 nodelay; include fastcgi_params; @@ -16,10 +16,10 @@ location = /wp-config.txt { log_not_found off; } -# Disallow PHP In Upload Folder +# Disallow php in upload folder location /wp-content/uploads/ { location ~ \.php$ { #Prevent Direct Access Of PHP Files From Web Browsers deny all; } -} \ No newline at end of file +} diff --git a/config/nginx/common/wpfc.conf b/config/nginx/common/wpfc.conf index fd0cc722..01144216 100644 --- a/config/nginx/common/wpfc.conf +++ b/config/nginx/common/wpfc.conf @@ -2,7 +2,7 @@ set $skip_cache 0; -# POST Requests And Urls With A Query String Should Always Go To PHP +# POST requests and URL with a query string should always go to php if ($request_method = POST) { set $skip_cache 1; } @@ -11,17 +11,17 @@ if ($query_string != "") { set $skip_cache 1; } -# Don't Cache Uris Containing The Following Segments +# Don't cache URL containing the following segments if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|wp-.*.php|index.php|/feed/|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") { set $skip_cache 1; } -# Don't Use The Cache For Logged In Users Or Recent Commenters +# Don't use the cache for logged in users or recent commenter if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") { set $skip_cache 1; } -# Use Cached Or Actual File If They Exists, Otherwise Pass Request To WordPress +# Use cached or actual file if they exists, Otherwise pass request to WordPress location / { try_files $uri $uri/ /index.php?$args; } diff --git a/config/nginx/common/wpsc.conf b/config/nginx/common/wpsc.conf index f0be1136..e680bd22 100644 --- a/config/nginx/common/wpsc.conf +++ b/config/nginx/common/wpsc.conf @@ -2,7 +2,7 @@ set $cache_uri $request_uri; -# POST Requests And Urls With A Query String Should Always Go To PHP +# POST requests and URL with a query string should always go to php if ($request_method = POST) { set $cache_uri 'null cache'; } @@ -11,17 +11,17 @@ if ($query_string != "") { set $cache_uri 'null cache'; } -# Don't Cache Uris Containing The Following Segments +# Don't cache URL containing the following segments if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|wp-.*.php|index.php|/feed/|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") { set $cache_uri 'null cache'; } -# Don't Use The Cache For Logged In Users Or Recent Commenters +# Don't use the cache for logged in users or recent commenter if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") { set $cache_uri 'null cache'; } -# Use Cached Or Actual File If They Exists, Otherwise Pass Request To WordPress +# Use cached or actual file if they exists, Otherwise pass request to WordPress location / { try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php$args; } @@ -31,6 +31,6 @@ location ~ \.php$ { include fastcgi_params; fastcgi_pass php; - # Following Line Is Needed By WP SUPER CACHE Plugin + # Following line is needed by WP Super Cache plugin fastcgi_param SERVER_NAME $http_host; } diff --git a/config/nginx/common/wpsubdir.conf b/config/nginx/common/wpsubdir.conf index daed4e7c..517ae9b7 100644 --- a/config/nginx/common/wpsubdir.conf +++ b/config/nginx/common/wpsubdir.conf @@ -2,12 +2,12 @@ if (!-e $request_filename) { - # Redirect wp-admin To wp-admin/ + # Redirect wp-admin to wp-admin/ rewrite /wp-admin$ $scheme://$host$uri/ permanent; - # Redirect wp-* Files/Folders + # Redirect wp-* files/folders rewrite ^(/[^/]+)?(/wp-.*) $2 last; - # Redirect Other PHP Files + # Redirect other php files rewrite ^(/[^/]+)?(/.*\.php) $2 last; } diff --git a/config/nginx/conf.d/fastcgi.conf b/config/nginx/conf.d/fastcgi.conf index f44a53b4..b0ee53fa 100644 --- a/config/nginx/conf.d/fastcgi.conf +++ b/config/nginx/conf.d/fastcgi.conf @@ -1,4 +1,4 @@ -# Fastcgi Cache Settings +# Fastcgi cache settings fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:50m inactive=60m; fastcgi_cache_key "$scheme$request_method$host$request_uri"; diff --git a/config/nginx/conf.d/upstream.conf b/config/nginx/conf.d/upstream.conf index 4645e69d..989f58d9 100644 --- a/config/nginx/conf.d/upstream.conf +++ b/config/nginx/conf.d/upstream.conf @@ -1,4 +1,5 @@ -# Common Upstream Settings +# Common upstream settings + upstream php { # server unix:/run/php5-fpm.sock; server 127.0.0.1:9000; diff --git a/templates/nginx/22222 b/templates/nginx/22222 index b6ee881e..9d93515e 100644 --- a/templates/nginx/22222 +++ b/templates/nginx/22222 @@ -1,4 +1,5 @@ -# EasyEngine Admin Configuration +# EasyEngine (ee) admin + server { listen 22222 default_server ssl spdy; @@ -9,13 +10,13 @@ server { ssl_certificate /var/www/22222/cert/22222.crt; ssl_certificate_key /var/www/22222/cert/22222.key; - # Force HTTP To HTTPS + # Force HTTP to HTTPS error_page 497 =200 https://$host:22222$request_uri; root /var/www/22222/htdocs; index index.php index.htm index.html; - # Turn On Directory List + # Turn on directory listing autoindex on; location / { diff --git a/templates/nginx/wpsubdir/w3tc.conf b/templates/nginx/wpsubdir/w3tc.conf index 0131a379..f61e520f 100644 --- a/templates/nginx/wpsubdir/w3tc.conf +++ b/templates/nginx/wpsubdir/w3tc.conf @@ -2,12 +2,12 @@ server { - # Uncomment The Following Line For Domain Mapping + # Uncomment the following line for domain mapping # listen 80 default_server; server_name example.com *.example.com; - # Uncomment The Following Line For Domain Mapping + # Uncomment the following line for domain mapping #server_name_in_redirect off; access_log /var/log/nginx/example.com.access.log rt_cache; diff --git a/templates/nginx/wpsubdir/wpfc.conf b/templates/nginx/wpsubdir/wpfc.conf index 98eb36b9..6e59806c 100644 --- a/templates/nginx/wpsubdir/wpfc.conf +++ b/templates/nginx/wpsubdir/wpfc.conf @@ -2,12 +2,12 @@ server { - # Uncomment The Following Line For Domain Mapping + # Uncomment the following line for domain mapping # listen 80 default_server; server_name example.com *.example.com; - # Uncomment The Following Line For Domain Mapping + # Uncomment the following line for domain mapping #server_name_in_redirect off; access_log /var/log/nginx/example.com.access.log rt_cache; diff --git a/templates/nginx/wpsubdir/wpsc.conf b/templates/nginx/wpsubdir/wpsc.conf index f40bef48..b5563c17 100644 --- a/templates/nginx/wpsubdir/wpsc.conf +++ b/templates/nginx/wpsubdir/wpsc.conf @@ -2,12 +2,12 @@ server { - # Uncomment The Following Line For Domain Mapping + # Uncomment the following line for domain mapping # listen 80 default_server; server_name example.com *.example.com; - # Uncomment The Following Line For Domain Mapping + # Uncomment the following line for domain mapping #server_name_in_redirect off; access_log /var/log/nginx/example.com.access.log rt_cache; diff --git a/templates/nginx/wpsubdomain/basic.conf b/templates/nginx/wpsubdomain/basic.conf index 8b7c3faa..ec6f3dea 100644 --- a/templates/nginx/wpsubdomain/basic.conf +++ b/templates/nginx/wpsubdomain/basic.conf @@ -2,12 +2,12 @@ server { - # Uncomment The Following Line For Domain Mapping + # Uncomment the following line for domain mapping # listen 80 default_server; server_name example.com *.example.com; - # Uncomment The Following Line For Domain Mapping + # Uncomment the following line for domain mapping #server_name_in_redirect off; access_log /var/log/nginx/example.com.access.log rt_cache; diff --git a/templates/nginx/wpsubdomain/w3tc.conf b/templates/nginx/wpsubdomain/w3tc.conf index 743a1656..0fa01143 100644 --- a/templates/nginx/wpsubdomain/w3tc.conf +++ b/templates/nginx/wpsubdomain/w3tc.conf @@ -2,12 +2,12 @@ server { - # Uncomment The Following Line For Domain Mapping + # Uncomment the following line for domain mapping # listen 80 default_server; server_name example.com *.example.com; - # Uncomment The Following Line For Domain Mapping + # Uncomment the following line for domain mapping #server_name_in_redirect off; access_log /var/log/nginx/example.com.access.log rt_cache; diff --git a/templates/nginx/wpsubdomain/wpfc.conf b/templates/nginx/wpsubdomain/wpfc.conf index 16c85811..56e93a95 100644 --- a/templates/nginx/wpsubdomain/wpfc.conf +++ b/templates/nginx/wpsubdomain/wpfc.conf @@ -2,12 +2,12 @@ server { - # Uncomment The Following Line For Domain Mapping + # Uncomment the following line for domain mapping # listen 80 default_server; server_name example.com *.example.com; - # Uncomment The Following Line For Domain Mapping + # Uncomment the following line for domain mapping #server_name_in_redirect off; access_log /var/log/nginx/example.com.access.log rt_cache; diff --git a/templates/nginx/wpsubdomain/wpsc.conf b/templates/nginx/wpsubdomain/wpsc.conf index 19e8a599..b78e12f7 100644 --- a/templates/nginx/wpsubdomain/wpsc.conf +++ b/templates/nginx/wpsubdomain/wpsc.conf @@ -2,12 +2,12 @@ server { - # Uncomment The Following Line For Domain Mapping + # Uncomment the following line for domain mapping # listen 80 default_server; server_name example.com *.example.com; - # Uncomment The Following Line For Domain Mapping + # Uncomment the following line for domain mapping #server_name_in_redirect off; access_log /var/log/nginx/example.com.access.log rt_cache;