Advertisement
Guest User

Untitled

a guest
Nov 28th, 2010
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. upstream backend {
  2. server 127.0.0.1:9000;
  3. }
  4.  
  5. server {
  6. listen 80;
  7. server_name muylinux.com *.muylinux.com;
  8. rewrite ^ http://www.muylinux.com/$request_uri permanent;
  9. }
  10.  
  11. server {
  12. listen 80;
  13.  
  14. access_log /var/www/muylinux/log/access.log;
  15. error_log /var/www/muylinux/log/error.log info;
  16.  
  17. server_name www.muylinux.com;
  18. root /var/www/muylinux/;
  19.  
  20. index index.php;
  21.  
  22. location / {
  23. try_files $uri $uri/ /index.php?q=$request_uri;
  24. }
  25.  
  26. ## Images and static content is treated different
  27. location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
  28. access_log off;
  29. expires 30d;
  30. }
  31.  
  32. ## Parse all .php file in the /var/www directory
  33. location ~ \.php$ {
  34. try_files $uri $uri/ /index.php?q=$request_uri;
  35.  
  36. fastcgi_split_path_info ^(.+\.php)(.*)$;
  37. fastcgi_pass backend;
  38. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  39.  
  40. include fastcgi_params; # This file has most of your old calls already.
  41.  
  42. fastcgi_intercept_errors on;
  43. fastcgi_ignore_client_abort on;
  44. fastcgi_read_timeout 180;
  45. }
  46.  
  47. ## Disable viewing .htaccess & .htpassword
  48. location ~ /\.ht {
  49. deny all;
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement