diff --git a/usr/local/sbin/easyengine b/usr/local/sbin/easyengine index eb0c1efb..3acaae42 100755 --- a/usr/local/sbin/easyengine +++ b/usr/local/sbin/easyengine @@ -114,6 +114,14 @@ COMMONNGINX() # Personal Settings For Nginx echo -e "\033[34m Updating Nginx Configuration Files... \e[0m" + # Change Nginx Worker Processes Connections And Gzip + sed -i "s/# gzip/gzip/" /etc/nginx/nginx.conf + sed -i "s/worker_connections.*/worker_connections 1024;/" /etc/nginx/nginx.conf + sed -i "s/worker_processes.*/worker_processes `cat /proc/cpuinfo | grep processor | wc -l`;/" /etc/nginx/nginx.conf + + # Set Custome Headers And Logs And Variables like fastcgi_read_timeout client_max_body_size + sed -i "s/http {/http {\n\t### Easy Engine Settings\n\tadd_header X-Powered-By "EasyEngine";\n\tadd_header rt-Fastcgi-Cache \$upstream_cache_status;\n\n\tfastcgi_read_timeout 300;\n\tclient_max_body_size 100m;\n\n\tlog_format ee_cache '\$remote_addr - \$upstream_cache_status [\$time_local]'\n\t\t'\"\$request\" \$status \$body_bytes_sent'\n\t\t'\"\$http_referer\" \"\$http_user_agent\"';/" /etc/nginx/nginx.conf + # Check Directory Exist if [ ! -d /etc/nginx/conf.d ] then diff --git a/usr/share/easyengine/nginx/wp/basic.conf b/usr/share/easyengine/nginx/wp/basic.conf index bb7e3ec6..d3c6c7c0 100644 --- a/usr/share/easyengine/nginx/wp/basic.conf +++ b/usr/share/easyengine/nginx/wp/basic.conf @@ -3,7 +3,7 @@ server { server_name example.com www.example.com; - access_log /var/log/nginx/example.com.access.log; + access_log /var/log/nginx/example.com.access.log ee_cache; error_log /var/log/nginx/example.com.error.log; root /var/www/example.com/htdocs; diff --git a/usr/share/easyengine/nginx/wp/w3tc.conf b/usr/share/easyengine/nginx/wp/w3tc.conf index 27903b61..15e207e7 100644 --- a/usr/share/easyengine/nginx/wp/w3tc.conf +++ b/usr/share/easyengine/nginx/wp/w3tc.conf @@ -3,7 +3,7 @@ server { server_name example.com www.example.com; - access_log /var/log/nginx/example.com.access.log; + access_log /var/log/nginx/example.com.access.log ee_cache; error_log /var/log/nginx/example.com.error.log; root /var/www/example.com/htdocs; diff --git a/usr/share/easyengine/nginx/wp/wpfc.conf b/usr/share/easyengine/nginx/wp/wpfc.conf index da0a5edd..1b63f902 100644 --- a/usr/share/easyengine/nginx/wp/wpfc.conf +++ b/usr/share/easyengine/nginx/wp/wpfc.conf @@ -3,7 +3,7 @@ server { server_name example.com www.example.com; - access_log /var/log/nginx/example.com.access.log; + access_log /var/log/nginx/example.com.access.log ee_cache; error_log /var/log/nginx/example.com.error.log; root /var/www/example.com/htdocs; diff --git a/usr/share/easyengine/nginx/wp/wpsc.conf b/usr/share/easyengine/nginx/wp/wpsc.conf index 4640c0cc..b1a2f14d 100644 --- a/usr/share/easyengine/nginx/wp/wpsc.conf +++ b/usr/share/easyengine/nginx/wp/wpsc.conf @@ -3,7 +3,7 @@ server { server_name example.com www.example.com; - access_log /var/log/nginx/example.com.access.log; + access_log /var/log/nginx/example.com.access.log ee_cache; error_log /var/log/nginx/example.com.error.log; root /var/www/example.com/htdocs; diff --git a/usr/share/easyengine/nginx/wpsubdir/basic.conf b/usr/share/easyengine/nginx/wpsubdir/basic.conf index 50f0f0dd..a410d35a 100644 --- a/usr/share/easyengine/nginx/wpsubdir/basic.conf +++ b/usr/share/easyengine/nginx/wpsubdir/basic.conf @@ -9,7 +9,7 @@ server { # Uncomment The Following Line For Domain Mapping #server_name_in_redirect off; - access_log /var/log/nginx/example.com.access.log; + access_log /var/log/nginx/example.com.access.log ee_cache; error_log /var/log/nginx/example.com.error.log; root /var/www/example.com/htdocs; diff --git a/usr/share/easyengine/nginx/wpsubdir/w3tc.conf b/usr/share/easyengine/nginx/wpsubdir/w3tc.conf index 546c5c07..8b657f33 100644 --- a/usr/share/easyengine/nginx/wpsubdir/w3tc.conf +++ b/usr/share/easyengine/nginx/wpsubdir/w3tc.conf @@ -9,7 +9,7 @@ server { # Uncomment The Following Line For Domain Mapping #server_name_in_redirect off; - access_log /var/log/nginx/example.com.access.log; + access_log /var/log/nginx/example.com.access.log ee_cache; error_log /var/log/nginx/example.com.error.log; root /var/www/example.com/htdocs; diff --git a/usr/share/easyengine/nginx/wpsubdir/wpfc.conf b/usr/share/easyengine/nginx/wpsubdir/wpfc.conf index 32c5762a..d2ee0e78 100644 --- a/usr/share/easyengine/nginx/wpsubdir/wpfc.conf +++ b/usr/share/easyengine/nginx/wpsubdir/wpfc.conf @@ -9,7 +9,7 @@ server { # Uncomment The Following Line For Domain Mapping #server_name_in_redirect off; - access_log /var/log/nginx/example.com.access.log; + access_log /var/log/nginx/example.com.access.log ee_cache; error_log /var/log/nginx/example.com.error.log; root /var/www/example.com/htdocs; diff --git a/usr/share/easyengine/nginx/wpsubdir/wpsc.conf b/usr/share/easyengine/nginx/wpsubdir/wpsc.conf index 6b07abcd..bca4f2c7 100644 --- a/usr/share/easyengine/nginx/wpsubdir/wpsc.conf +++ b/usr/share/easyengine/nginx/wpsubdir/wpsc.conf @@ -9,7 +9,7 @@ server { # Uncomment The Following Line For Domain Mapping #server_name_in_redirect off; - access_log /var/log/nginx/example.com.access.log; + access_log /var/log/nginx/example.com.access.log ee_cache; error_log /var/log/nginx/example.com.error.log; root /var/www/example.com/htdocs; diff --git a/usr/share/easyengine/nginx/wpsubdomain/basic.conf b/usr/share/easyengine/nginx/wpsubdomain/basic.conf index dcf57d3a..2dabb9b9 100644 --- a/usr/share/easyengine/nginx/wpsubdomain/basic.conf +++ b/usr/share/easyengine/nginx/wpsubdomain/basic.conf @@ -9,7 +9,7 @@ server { # Uncomment The Following Line For Domain Mapping #server_name_in_redirect off; - access_log /var/log/nginx/example.com.access.log; + access_log /var/log/nginx/example.com.access.log ee_cache; error_log /var/log/nginx/example.com.error.log; root /var/www/example.com/htdocs; diff --git a/usr/share/easyengine/nginx/wpsubdomain/w3tc.conf b/usr/share/easyengine/nginx/wpsubdomain/w3tc.conf index fc7b7d82..86b4c945 100644 --- a/usr/share/easyengine/nginx/wpsubdomain/w3tc.conf +++ b/usr/share/easyengine/nginx/wpsubdomain/w3tc.conf @@ -9,7 +9,7 @@ server { # Uncomment The Following Line For Domain Mapping #server_name_in_redirect off; - access_log /var/log/nginx/example.com.access.log; + access_log /var/log/nginx/example.com.access.log ee_cache; error_log /var/log/nginx/example.com.error.log; root /var/www/example.com/htdocs; diff --git a/usr/share/easyengine/nginx/wpsubdomain/wpfc.conf b/usr/share/easyengine/nginx/wpsubdomain/wpfc.conf index b110f8d4..0766a10a 100644 --- a/usr/share/easyengine/nginx/wpsubdomain/wpfc.conf +++ b/usr/share/easyengine/nginx/wpsubdomain/wpfc.conf @@ -9,7 +9,7 @@ server { # Uncomment The Following Line For Domain Mapping #server_name_in_redirect off; - access_log /var/log/nginx/example.com.access.log; + access_log /var/log/nginx/example.com.access.log ee_cache; error_log /var/log/nginx/example.com.error.log; root /var/www/example.com/htdocs; diff --git a/usr/share/easyengine/nginx/wpsubdomain/wpsc.conf b/usr/share/easyengine/nginx/wpsubdomain/wpsc.conf index d34f45f0..2564a1f8 100644 --- a/usr/share/easyengine/nginx/wpsubdomain/wpsc.conf +++ b/usr/share/easyengine/nginx/wpsubdomain/wpsc.conf @@ -9,7 +9,7 @@ server { # Uncomment The Following Line For Domain Mapping #server_name_in_redirect off; - access_log /var/log/nginx/example.com.access.log; + access_log /var/log/nginx/example.com.access.log ee_cache; error_log /var/log/nginx/example.com.error.log; root /var/www/example.com/htdocs;