default.conf 1.3 KB

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