default.conf 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. server {
  2. listen 80;
  3. server_name localhost;
  4. #charset koi8-r;
  5. #access_log /var/log/nginx/host.access.log main;
  6. root /usr/share/nginx/html;
  7. location / {
  8. try_files $uri $uri/ @router;
  9. #rewrite ^/s1/(.*)\.html$ /DownloadSingle?code=$1 redirect;
  10. #rewrite ^/s2/(.*)\.html$ /DownloadSingleB?code=$1 redirect;
  11. index index.html index.htm;
  12. }
  13. location @router {
  14. rewrite ^.*$ /index.html last;
  15. }
  16. #error_page 404 /404.html;
  17. # redirect server error pages to the static page /50x.html
  18. #
  19. error_page 500 502 503 504 /50x.html;
  20. location = /50x.html {
  21. root /usr/share/nginx/html;
  22. }
  23. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  24. #
  25. #location ~ \.php$ {
  26. # proxy_pass http://127.0.0.1;
  27. #}
  28. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  29. #
  30. #location ~ \.php$ {
  31. # root html;
  32. # fastcgi_pass 127.0.0.1:9000;
  33. # fastcgi_index index.php;
  34. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  35. # include fastcgi_params;
  36. #}
  37. # deny access to .htaccess files, if Apache's document root
  38. # concurs with nginx's one
  39. #
  40. #location ~ /\.ht {
  41. # deny all;
  42. #}
  43. }