lj2007331 пре 9 година
родитељ
комит
3e8a742c1e
4 измењених фајлова са 12 додато и 9 уклоњено
  1. 3 2
      config/nginx.conf
  2. 3 2
      config/nginx_apache.conf
  3. 2 1
      config/nginx_tomcat.conf
  4. 4 4
      vhost.sh

+ 3 - 2
config/nginx.conf

@@ -8,6 +8,7 @@ worker_rlimit_nofile 51200;
 events {
     use epoll;
     worker_connections 51200;
+    multi_accept on;
     }
 
 http {
@@ -46,7 +47,7 @@ http {
         text/css text/plain text/x-component
         font/opentype application/x-font-ttf application/vnd.ms-fontobject
         image/x-icon;
-    gzip_disable  "msie6";
+    gzip_disable "MSIE [1-6]\.(?!.*SV1)";
 
     #If you have a lot of static files to serve through Nginx then caching of the files' metadata (not the actual files' contents) can save some latency.
     open_file_cache max=1000 inactive=20s;
@@ -67,7 +68,7 @@ http {
         allow 127.0.0.1;
         deny all;
         }
-    location ~ .*\.(php|php5)?$ {
+    location ~ [^/]\.php(/|$) {
         #fastcgi_pass remote_php_ip:9000;
         fastcgi_pass unix:/dev/shm/php-cgi.sock;
         fastcgi_index index.php;

+ 3 - 2
config/nginx_apache.conf

@@ -8,6 +8,7 @@ worker_rlimit_nofile 51200;
 events {
     use epoll;
     worker_connections 51200;
+    multi_accept on;
     }
 
 http {
@@ -46,7 +47,7 @@ http {
         text/css text/plain text/x-component
         font/opentype application/x-font-ttf application/vnd.ms-fontobject
         image/x-icon;
-    gzip_disable  "msie6";
+    gzip_disable "MSIE [1-6]\.(?!.*SV1)";
 
     #If you have a lot of static files to serve through Nginx then caching of the files' metadata (not the actual files' contents) can save some latency.
     open_file_cache max=1000 inactive=20s;
@@ -74,7 +75,7 @@ http {
         proxy_pass http://127.0.0.1:88;
         include proxy.conf;
         }
-    location ~ .*\.(php|php5)?$  {
+    location ~ [^/]\.php(/|$) {
         proxy_pass http://127.0.0.1:88;
         include proxy.conf;
         }

+ 2 - 1
config/nginx_tomcat.conf

@@ -8,6 +8,7 @@ worker_rlimit_nofile 51200;
 events {
     use epoll;
     worker_connections 51200;
+    multi_accept on;
     }
 
 http {
@@ -46,7 +47,7 @@ http {
         text/css text/plain text/x-component
         font/opentype application/x-font-ttf application/vnd.ms-fontobject
         image/x-icon;
-    gzip_disable  "msie6";
+    gzip_disable "MSIE [1-6]\.(?!.*SV1)";
 
     #If you have a lot of static files to serve through Nginx then caching of the files' metadata (not the actual files' contents) can save some latency.
     open_file_cache max=1000 inactive=20s;

+ 4 - 4
vhost.sh

@@ -124,7 +124,7 @@ else
 fi
 
 if [ "$NGX_FLAG" == 'php' ];then
-    NGX_CONF=$(echo -e "location ~ .*\.(php|php5)?$ {\n    #fastcgi_pass remote_php_ip:9000;\n    fastcgi_pass unix:/dev/shm/php-cgi.sock;\n    fastcgi_index index.php;\n    include fastcgi.conf;\n    }")
+    NGX_CONF=$(echo -e "location ~ [^/]\.php(/|$) {\n    #fastcgi_pass remote_php_ip:9000;\n    fastcgi_pass unix:/dev/shm/php-cgi.sock;\n    fastcgi_index index.php;\n    include fastcgi.conf;\n    }")
 elif [ "$NGX_FLAG" == 'java' ];then
     NGX_CONF=$(echo -e "location ~ {\n    proxy_pass http://127.0.0.1:8080;\n    include proxy.conf;\n    }")
 elif [ "$NGX_FLAG" == 'hhvm' ];then
@@ -658,7 +658,7 @@ echo "`printf "%-30s" "Directory of:"`${CMSG}$vhostdir${CEND}"
 }
 
 Add_Vhost() {
-    if [ -e "$web_install_dir/sbin/nginx" -a ! -e "$apache_install_dir/modules/libphp5.so" ];then
+    if [ -e "$web_install_dir/sbin/nginx" -a ! -e "`ls $apache_install_dir/modules/libphp?.so`" ];then
         Choose_env
         Input_Add_domain
         Nginx_anti_hotlinking
@@ -670,7 +670,7 @@ Add_Vhost() {
             Nginx_log
             Create_nginx_php-fpm_hhvm_conf
         fi
-    elif [ ! -e "$web_install_dir/sbin/nginx" -a -e "$apache_install_dir/modules/libphp5.so" ];then
+    elif [ ! -e "$web_install_dir/sbin/nginx" -a -e "`ls $apache_install_dir/modules/libphp?.so`" ];then
         Choose_env
         Input_Add_domain
         Apache_log
@@ -679,7 +679,7 @@ Add_Vhost() {
         Choose_env
         Input_Add_domain
         Create_tomcat_conf
-    elif [ -e "$web_install_dir/sbin/nginx" -a -e "$apache_install_dir/modules/libphp5.so" ];then
+    elif [ -e "$web_install_dir/sbin/nginx" -a -e "`ls $apache_install_dir/modules/libphp?.so`" ];then
         Choose_env
         Input_Add_domain
         Nginx_anti_hotlinking