Advertisement
Guest User

Untitled

a guest
Apr 1st, 2013
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. upstream backend { server unix:/var/run/php5-fpm.sock; }
  2. upstream memcached { server 127.0.0.1:11211; }
  3.  
  4. server
  5. {
  6. listen 8080;
  7. server_name www.cs-amx.fr;
  8.  
  9. rewrite ^ http://cs-amx.fr$request_uri? permanent;
  10. }
  11.  
  12. server
  13. {
  14. listen 8080;
  15. server_name cs-amx.fr;
  16.  
  17. root /srv/d_cs-amx/www/cs-amx.fr/htdocs;
  18. index index.html index.htm index.php;
  19.  
  20. charset utf-8;
  21.  
  22. add_header "X-UA-Compatible" "IE=Edge,chrome=1";
  23. add_header "Access-Control-Allow-Origin" "*";
  24.  
  25. location = /robots.txt { allow all; log_not_found off; access_log off; }
  26. location = /favicon.ico { log_not_found off; access_log off; }
  27. location ~* (^|/)\. { deny all; }
  28.  
  29. location ~ /(internal_data|library)
  30. {
  31. internal;
  32. }
  33.  
  34. #error_page 404 = @rewrite;
  35.  
  36. location /
  37. {
  38. try_files $uri $uri/ /index.php?$uri&$args;
  39. #expires 30d;
  40. }
  41.  
  42. location ~ ^/(attachments|albums|qus)/(.*)$
  43. {
  44. rewrite ^/(.*)$ /index.php?$1&$args last;
  45. #try_files /index.php?attachments/do-upload\.json?$args /index.php?$uri&$args;
  46. }
  47.  
  48. location ~* (\.|-)(?:jpg|jpeg|gif|png|ico|gz|svg|svgz|mp4|ogg|ogv|webm|css|js|ttf|ttc|otf|eot|woff|ico)(.*)?$
  49. {
  50. expires max;
  51. access_log off;
  52. add_header Cache-Control "public";
  53. }
  54.  
  55. location ~ \css.php$
  56. {
  57. expires max;
  58. access_log off;
  59. add_header Cache-Control "public";
  60. }
  61.  
  62. location ~ \.php$
  63. {
  64. try_files $uri /index.php;
  65.  
  66. fastcgi_pass backend;
  67. fastcgi_index index.php;
  68. fastcgi_split_path_info ^(.+\.php)(/.*)$;
  69.  
  70. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  71. fastcgi_param PATH_INFO $fastcgi_path_info;
  72. fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  73.  
  74. include fastcgi_params;
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement