Advertisement
Guest User

mysite nginx conf

a guest
May 9th, 2013
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2.     listen       80;
  3.     server_name  adm.mysite.com;
  4.     root         D:/zerver/sites/mysite/back;
  5.     index        index.html;
  6.     charset      UTF-8;
  7.  
  8.     include  sites/mysite-mime.types;
  9.     default_type  application/octet-stream;
  10.  
  11.     location = / {
  12.         index  gateway.php;
  13.     }
  14.  
  15.     location = /gateway.php {
  16.         include php.conf;
  17.     }
  18.  
  19.     location = /thumbnail.php {
  20.         include php.conf;
  21.     }
  22.  
  23.     location /temp/ {
  24.         alias  D:/zerver/sites/mysite/system/temp/;
  25.     }
  26.  
  27.     location ~ \.(?:css|js|jpg|png|gif|ico|swf|woff|eot|ttf)$ {
  28.         expires     30d;
  29.         add_header  Pragma public;
  30.         add_header  Cache-Control "public";
  31.     }
  32.  
  33.     location ~ \.(?:czz|jz)$ {
  34.         expires     10d;
  35.         add_header  Pragma public;
  36.         add_header  Cache-Control "public";
  37.         add_header  Content-Encoding gzip;
  38.         add_header  Vary Accept-Encoding;
  39.     }
  40.  
  41.     location ~ \.(ajax|gzip)$ {
  42.         set $request_type $1;
  43.         rewrite ^ /gateway.php?REQUEST_URL=$uri&REQUEST_TYPE=$request_type&IS_REWRITE_URL=1 last;
  44.     }
  45.  
  46.     location ~ ^/([a-z]+)/([a-z-]+)([\w/-]+)?$ {
  47.         set $section $1; set $module $2; set $request_url $3;
  48.         rewrite ^ /gateway.php?SECTION=$section&MODULE=$module&REQUEST_URL=$request_url&IS_REWRITE_URL=1 last;
  49.     }
  50.  
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement