default.conf 1.1 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. index index.html index.htm;
  9. }
  10. location /bapi/ {
  11. proxy_pass https://unit-api.baidu.com/;
  12. }
  13. #error_page 404 /404.html;
  14. # redirect server error pages to the static page /50x.html
  15. #
  16. error_page 500 502 503 504 /50x.html;
  17. location = /50x.html {
  18. root /usr/share/nginx/html;
  19. }
  20. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  21. #
  22. #location ~ \.php$ {
  23. # proxy_pass http://127.0.0.1;
  24. #}
  25. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  26. #
  27. #location ~ \.php$ {
  28. # root html;
  29. # fastcgi_pass 127.0.0.1:9000;
  30. # fastcgi_index index.php;
  31. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  32. # include fastcgi_params;
  33. #}
  34. # deny access to .htaccess files, if Apache's document root
  35. # concurs with nginx's one
  36. #
  37. #location ~ /\.ht {
  38. # deny all;
  39. #}
  40. }