Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 5th, 2012  |  syntax: None  |  size: 0.94 KB  |  views: 108  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. server {
  2.  
  3.     listen   80;
  4.     server_name  ec2-....compute-1.amazonaws.com www.ec2-....compute-1.amazonaws.com;
  5.     access_log  /var/log/nginx/localhost.access.log;
  6.  
  7.         ## Disable viewing .htaccess & .htpassword
  8.     location ~ /\.ht {
  9.         deny  all;
  10.     }
  11.  
  12.         location / {
  13.                 root   /var/www/mysite;
  14.                 index  index.php index.html;
  15.         }
  16.  
  17.        
  18.     location ~ \.php$ {
  19.         root /var/www/mysite;
  20.         fastcgi_split_path_info ^(.+\.php)(.*)$;
  21.         fastcgi_pass unix:/dev/shm/php-fpm-www.sock;
  22.         fastcgi_index  index.php;
  23.         fastcgi_param  SCRIPT_FILENAME  /var/www/mysite$fastcgi_script_name;
  24.         include fastcgi_params;
  25.         fastcgi_ignore_client_abort on;
  26.         fastcgi_param  SERVER_NAME $http_host;
  27.     }
  28.  
  29.         ## Images and static content is treated different
  30.     location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
  31.       access_log        off;
  32.       expires           30d;
  33.       root /var/www/mysite;
  34.     }
  35.    
  36. }
clone this paste RAW Paste Data