default.conf 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. server {
  2. listen 80;
  3. server_name localhost;
  4. #charset koi8-r;
  5. #access_log /var/log/nginx/host.access.log main;
  6. location / {
  7. root /usr/share/nginx/html;
  8. try_files $uri $uri/ /index.html;
  9. index index.html index.htm;
  10. error_page 404 404.html;
  11. add_header Cache-Control "no-store";
  12. expires -1;
  13. }
  14. # error_page 404 /usr/share/nginx/html/404.html;
  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. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  22. #
  23. #location ~ \.php$ {
  24. # proxy_pass http://127.0.0.1;
  25. #}
  26. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  27. #
  28. #location ~ \.php$ {
  29. # root html;
  30. # fastcgi_pass 127.0.0.1:9000;
  31. # fastcgi_index index.php;
  32. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  33. # include fastcgi_params;
  34. #}
  35. # deny access to .htaccess files, if Apache's document root
  36. # concurs with nginx's one
  37. #
  38. #location ~ /\.ht {
  39. # deny all;
  40. #}
  41. }