Advertisement
emcniece

/etc/nginx/conf.d/default.conf

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