Advertisement
Guest User

Untitled

a guest
Dec 29th, 2014
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name [my server ip] [my domain];
  4.  
  5. root /var/www/openbay/www;
  6. index index.php;
  7.  
  8. set $yii_bootstrap “index.php”;
  9.  
  10. charset utf-8;
  11. gzip on;
  12. gzip_comp_level 5;
  13. gzip_types text/plain text/css text/javascript application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss;
  14.  
  15. location / {
  16. index index.html $yii_bootstrap;
  17. try_files $uri $uri/ /$yii_bootstrap?$args;
  18. }
  19.  
  20. location ~ \.(js|css|png|jpg|gif|swf|ico|svg)$ {
  21. fastcgi_hide_header Set-Cookie;
  22.  
  23. open_file_cache max=10000 inactive=14d;
  24. open_file_cache_errors on;
  25. open_file_cache_min_uses 3;
  26. open_file_cache_valid 1m;
  27. output_buffers 1 2m;
  28.  
  29. expires 14d;
  30. }
  31.  
  32. location ~* \.php$ {
  33. fastcgi_split_path_info ^(.+\.php)(.*)$;
  34. set $fsn /$yii_bootstrap;
  35. if (-f $document_root$fastcgi_script_name){
  36. set $fsn $fastcgi_script_name;
  37. }
  38. fastcgi_pass localhost:9000;
  39. include fastcgi_params;
  40. fastcgi_param SCRIPT_FILENAME $document_root$fsn;
  41. fastcgi_param PATH_INFO $fastcgi_path_info;
  42. fastcgi_param PATH_TRANSLATED $document_root$fsn;
  43. # fastcgi_param HTTPS $https_value;
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement