Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

default-nginx.conf 1.3KB

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