Advertisement
Guest User

Untitled

a guest
Dec 5th, 2012
1,412
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement