Jump to content

sunyan

Member Since 26 Jul 2011
Offline  Last Active Oct 26 2012 06:05 AM
-----

#98826 Nginx + php-fpm need nginx rewrites

Posted by sunyan on 06 May 2012 - 12:31 PM

]:) I using nginx now. this is my config-files :
nginx.conf
user  www-data;
worker_processes  2;
error_log  /var/log/nginx/error.log;
worker_rlimit_nofile 65535;
pid        /var/run/nginx.pid;
events {
    worker_connections  65535;
}
http {
               include       mime.types;
       default_type  application/octet-stream;
	   add_header X-UA-Compatible 'IE=EmulateIE7';
       server_names_hash_bucket_size 128;
       large_client_header_buffers 4 4k;
       client_max_body_size 8m;
       client_header_buffer_size 4k;
       sendfile        on;
       tcp_nopush      on;
       open_file_cache max=65535 inactive=60s;
       open_file_cache_valid 60s;
	   server_tokens off;
       open_file_cache_min_uses 1;
       send_timeout        10;
  ####fastcgi module#######
       fastcgi_connect_timeout 300;
       fastcgi_send_timeout 300;
       fastcgi_read_timeout 300;
       fastcgi_buffer_size 4k;
       fastcgi_buffers 128 4k;
       fastcgi_busy_buffers_size 128k;
       fastcgi_temp_file_write_size 128k;
       keepalive_timeout  180;
###########about gzip module #####
       gzip  on;
       gzip_min_length  1024;
       gzip_comp_level   9;
       gzip_http_version 1.1 ;
       gzip_buffers     4 16k;
       gzip_types  text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/atom+xml;
       gzip_vary on;
       gzip_disable “MSIE [1-6]\.(?!.*SV1)”;
       charset utf8;
       log_format  main  '$remote_addr - $remote_user [$time_local] '
                     '"$request" $status $body_bytes_sent '
                     '"$http_referer" "$http_user_agent"';
                     include           vhosts/*.conf;
        }
vhost.conf
server {
    listen       80;
    server_name  www.babystar100.com;

    #charset koi8-r;
    #access_log  /var/log/nginx/log/host.access.log  main;

    root   /data/www/html;
    index   index.php index.html;


    location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt|htm)$ {
    access_log off;
    expires 30d;
    }
    # Add expires header for static content
    location ~* \.(js|css|jpg|jpeg|gif|png|swf)$ {
    if (-f $request_filename) {
       root /data/www/html;
       expires      1d;
       break;
    }
    }
    
    # Get rid of index.php
     location /index.php {
     rewrite ^/(.*)$ /index.php?rewrite=2 last;
    }

    # Rewrite all directory-looking urls
    location ~ /$ {
     rewrite ^/(.*)$ /index.php?rewrite=1 last;
    }

    # Try to route missing files
    # If the file doesn't exist, rewrite to index
    try_files $uri $uri/ @exist;
    location @exist {
    rewrite ^(.*)$ /index.php?rewrite=1 last;
    }

    #location / {
    #    root   /data/www/html;
    #    index  index.php index.html index.htm;
    #}

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/www/html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  /data/www/html$fastcgi_script_name;
        include        fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}

    location /install/ {
    root /data/www/html/install;
    index index.php;
    if (!-e $request_filename) { rewrite ^(.*)$ /install/index.php?rewrite=1; }
    }

}

I hope this can help anyone .


#93300 Fixing the points/spend link error in Rewards Shop Help Page

Posted by sunyan on 12 February 2012 - 09:35 AM

I solved this bug . my site is work fine now . at here ill tell anyone.
1st. download this file : This file ,use it replace "application/modules/Activitypoints/Form/Admin/settings.php" .
2nd. go to admin>plugins>activity points >Global Settings>disable every items .
3rd, Flush your cache .
4th,go to admin>plugins>activity points >Global Settings>enable every items and save change.

now go to your site font , click topuser link . you can see all your want .

dont forget +REp :dry:


Hello, someone tell me to reshare this file. I share it here again . you can clickthis linkto download.


#82467 How to create a Custom 404 Error Page :)

Posted by sunyan on 03 November 2011 - 09:12 AM

Thanks very much !!


#80639 Social Engine 4.1.8 - Nulled by Cataphract

Posted by sunyan on 23 October 2011 - 02:15 AM

Thanks very very..........much ! I use this updated the site on my test server . its worked very nice !! I looked the error log ,its display "File is empty." +rep


#78977 Speed UP SE - Minisy-4.0.1-Non nulled

Posted by sunyan on 11 October 2011 - 02:01 AM

I bought this plugin . now share it here , i hope anyone can null it . Link :dry:


#75139 Fixing the points/spend link error in Rewards Shop Help Page

Posted by sunyan on 08 September 2011 - 08:23 AM

I solved this bug . my site is work fine now . at here ill tell anyone.
1st. download this file : This file ,use it replace "application/modules/Activitypoints/Form/Admin/settings.php" .
2nd. go to admin>plugins>activity points >Global Settings>disable every items .
3rd, Flush your cache .
4th,go to admin>plugins>activity points >Global Settings>enable every items and save change.

now go to your site font , click topuser link . you can see all your want .

dont forget +REp :dry:


#74870 How to speed up SE4

Posted by sunyan on 05 September 2011 - 08:00 AM

i use the php_speedy to speed up my site .its very fast .i share my .htaccess.file to all. hope help anyone.
# $Id: .htaccess 7539 2010-10-04 04:41:38Z john $
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
<Files ~ "^\.(htaccess|htpasswd)$">
deny from all
</Files>
# BEGIN GZIP
   <ifmodule mod_deflate.c>
   AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
   </ifmodule>
   # END GZIP
# BEGIN Expire headers
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresDefault "access plus 1 seconds"
  ExpiresByType image/x-icon "access plus 2592000 seconds"
  ExpiresByType image/jpeg "access plus 2592000 seconds"
  ExpiresByType image/png "access plus 2592000 seconds"
  ExpiresByType image/gif "access plus 2592000 seconds"
  ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
  ExpiresByType text/css "access plus 604800 seconds"
  ExpiresByType text/javascript "access plus 216000 seconds"
  ExpiresByType application/javascript "access plus 216000 seconds"
  ExpiresByType application/x-javascript "access plus 216000 seconds"
  ExpiresByType text/html "access plus 600 seconds"
  ExpiresByType application/xhtml+xml "access plus 600 seconds"
</IfModule>
# END Expire headers

# BEGIN Cache-Control Headers
<IfModule mod_headers.c>
  <FilesMatch "\.(ico|jpe?g|png|gif|swf)$">
    Header set Cache-Control "max-age=2592000, public"
  </FilesMatch>
  <FilesMatch "\.(css)$">
    Header set Cache-Control "max-age=604800, public"
  </FilesMatch>
  <FilesMatch "\.(js)$">
    Header set Cache-Control "max-age=216000, private"
  </FilesMatch>
  <FilesMatch "\.(x?html?|php)$">
    Header set Cache-Control "max-age=600, private, must-revalidate"
  </FilesMatch>
</IfModule>
# END Cache-Control Headers

# BEGIN Remove Last-Modified Header
<IfModule mod_headers.c>
  Header unset Last-Modified
</IfModule>
# END Remove Last-Modified Header

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(babystar100\.com)(:80)? [NC]
RewriteRule ^(.*) http://www.babystar100.com/$1 [R=301,L]
order deny,allow

ExpiresActive On
ExpiresDefault A600
ExpiresByType image/x-icon A2592000
ExpiresByType application/javascript A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType text/css A604800
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType text/plain A86400
ExpiresByType application/x-shockwave-flash A2592000
ExpiresByType video/x-flv A2592000
ExpiresByType application/pdf A2592000
ExpiresByType text/html A600

<IfModule mod_rewrite.c>
  Options +FollowSymLinks
  RewriteEngine On
  RewriteBase /

  # Get rid of index.php
  RewriteCond %{REQUEST_URI} /index\.php
  RewriteRule (.*) index.php?rewrite=2 [L,QSA]

  # Rewrite all directory-looking urls
  RewriteCond %{REQUEST_URI} /$
  RewriteRule (.*) index.php?rewrite=1 [L,QSA]

  # Try to route missing files
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} public\/ [OR]
  RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$
  RewriteRule . - [L]
  
  # If the file doesn't exist, rewrite to index
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]

</IfModule>

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
  Header set Cache-Control "public, no-transform"
  Header set Expires "Fri, 21 Dec 2012 00:00:00 GMT"
  Header unset Last-Modified
  </FilesMatch>
  <IfModule mod_deflate.c>
   AddOutputFilterByType DEFLATE text/html
   AddOutputFilterByType DEFLATE application/x-httpd-php
   AddOutputFilterByType DEFLATE application/zip
   AddOutputFilterByType DEFLATE text/css
   AddOutputFilterByType DEFLATE text/plain
   AddOutputFilterByType DEFLATE image/gif
   AddOutputFilterByType DEFLATE image/png
   AddOutputFilterByType DEFLATE text/javascript
   AddOutputFilterByType DEFLATE text/xml
   AddOutputFilterByType DEFLATE application/javascript
   AddOutputFilterByType DEFLATE application/rss+xml
   AddOutputFilterByType DEFLATE application/vnd.groove-tool-template
   AddOutputFilterByType DEFLATE text/js
   AddOutputFilterByType DEFLATE image/jpeg
   AddOutputFilterByType DEFLATE text/csv
   AddOutputFilterByType DEFLATE application/json
 </IfModule>
</IfModule>
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>

# sends requests /index.php/path/to/module/ to "index.php"
# AcceptPathInfo On

# @todo This may not be effective in some cases
FileETag Size

Right on!




#73135 Advanced Wall bought by my

Posted by sunyan on 22 August 2011 - 03:44 AM

i installed it on 4.1.7 , can't work .




All the resources listed here are just for testing purpose and they shouldn't be used at any commercial environment without a valid license.
Those are for users who wants to try them before buy. Help the developer to build it better by purchasing them from original authors.