Advertisement
Guest User

Untitled

a guest
Apr 5th, 2012
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name files.xxxx.xxxx;
  4. server_name_in_redirect off;
  5.  
  6. root /home/public_html/files.xxxx.xxxx;
  7. index index.php;
  8. client_body_buffer_size 4m;
  9. client_max_body_size 1024m;
  10. fastcgi_buffers 64 16k;
  11.  
  12. error_log logs/files/error.log warn;
  13. access_log logs/files/access.log main;
  14.  
  15. error_page 404 = @rewrite;
  16. error_page 403 = @rewrite;
  17.  
  18. location ~* ^.+.(bmp|svg|svgz|zip|gzip|bz2|rar|jpg|jpeg|gif|css|png|js|ico|pdf|gz)$ {
  19. access_log off;
  20. expires 30d;
  21. }
  22.  
  23. location / {
  24. try_files $uri $uri/ @rewrite;
  25. }
  26.  
  27. location @rewrite {
  28. rewrite ^/(.*)$ /index.php?main=$1;
  29. }
  30.  
  31. location ~ /(system|upload) {
  32. deny all;
  33. return 404;
  34. }
  35.  
  36. location ~ \.php$ {
  37. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  38. include fastcgi_params;
  39. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  40. #fastcgi_intercept_errors on;
  41. fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  42. }
  43.  
  44. location ^~ /upload {
  45. internal;
  46. }
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement