前端文件

image.png
image.png
image.png

nginx 配置

  1. #user nobody;
  2. worker_processes 1;
  3. #error_log logs/error.log;
  4. #error_log logs/error.log notice;
  5. #error_log logs/error.log info;
  6. #pid logs/nginx.pid;
  7. events {
  8. worker_connections 1024;
  9. }
  10. http {
  11. include mime.types;
  12. default_type application/octet-stream;
  13. sendfile on;
  14. #tcp_nopush on;
  15. #keepalive_timeout 0;
  16. keepalive_timeout 65;
  17. #gzip on;
  18. server {
  19. listen 8080;
  20. server_name localhost;
  21. #charset koi8-r;
  22. #access_log logs/host.access.log main;
  23. location / {
  24. root html;
  25. index index.html index.htm;
  26. }
  27. #error_page 404 /404.html;
  28. # redirect server error pages to the static page /50x.html
  29. #
  30. error_page 500 502 503 504 /50x.html;
  31. location = /50x.html {
  32. root html;
  33. }
  34. }
  35. server {
  36. listen 8081;
  37. server_name localhost;
  38. #charset koi8-r;
  39. #access_log logs/host.access.log main;
  40. location / {
  41. root html/fby;
  42. index index.html index.htm;
  43. try_files $uri $uri/ /index.html;
  44. }
  45. #error_page 404 /404.html;
  46. # redirect server error pages to the static page /50x.html
  47. #
  48. error_page 500 502 503 504 /50x.html;
  49. location = /50x.html {
  50. root html/fby;
  51. }
  52. }
  53. server {
  54. listen 8082;
  55. server_name localhost;
  56. #charset koi8-r;
  57. #access_log logs/host.access.log main;
  58. location / {
  59. root html/kg;
  60. index index.html index.htm;
  61. try_files $uri $uri/ /index.html;
  62. }
  63. #error_page 404 /404.html;
  64. # redirect server error pages to the static page /50x.html
  65. #
  66. error_page 500 502 503 504 /50x.html;
  67. location = /50x.html {
  68. root html/kg;
  69. }
  70. }
  71. }

浏览器访问

image.png
image.png