Advertisement
Guest User

Untitled

a guest
Jul 31st, 2014
994
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name localhost;
  4.  
  5. #charset koi8-r;
  6. #access_log /var/log/nginx/log/host.access.log main;
  7.  
  8. location / {
  9. root /var/www/html;
  10. index index.html index.htm index.php;
  11. }
  12.  
  13. #error_page 404 /404.html;
  14.  
  15. # redirect server error pages to the static page /50x.html
  16. #
  17. error_page 500 502 503 504 /50x.html;
  18. location = /50x.html {
  19. root /usr/share/nginx/html;
  20. }
  21.  
  22. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  23. #
  24. #location ~ \.php$ {
  25. # proxy_pass http://127.0.0.1;
  26. #}
  27.  
  28. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  29. #
  30. location ~ \.php$ {
  31. root /var/www/html;
  32. try_files $uri =404;
  33. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  34. fastcgi_pass unix:/var/run/php5-fpm.sock;
  35. fastcgi_index index.php;
  36. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  37. include fastcgi_params;
  38. #fastcgi_pass 127.0.0.1:9000;
  39.  
  40. }
  41.  
  42. # deny access to .htaccess files, if Apache's document root
  43. # concurs with nginx's one
  44. #
  45. #location ~ /\.ht {
  46. # deny all;
  47. #}
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement