后台管理

moa2-frontend

Moa2 Frontend

前后端分离

  • shop-server 3000
  • shop-admin 3010
  • nginx 8000 即3010
    • /api 即3000
  1. worker_processes 1;
  2. error_log logs/error.log;
  3. error_log logs/error.log notice;
  4. error_log logs/error.log info;
  5. pid logs/nginx.pid;
  6. events {
  7. worker_connections 1024;
  8. }
  9. http {
  10. # include mime.types;
  11. default_type application/octet-stream;
  12. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  13. access_log logs/access.log main;
  14. sendfile on;
  15. #tcp_nopush on;
  16. #keepalive_timeout 0;
  17. keepalive_timeout 65;
  18. server {
  19. listen 8000;
  20. server_name localhost;
  21. #charset koi8-r;
  22. #access_log logs/host.access.log main;
  23. # redirect server error pages to the static page /50x.html
  24. #
  25. error_page 500 502 503 504 /50x.html;
  26. location = /50x.html {
  27. root html;
  28. }
  29. location / {
  30. proxy_redirect off;
  31. proxy_set_header Host $host;
  32. proxy_set_header X-Real-IP $remote_addr;
  33. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  34. proxy_set_header Host $http_host;
  35. proxy_set_header X-NginX-Proxy true;
  36. proxy_pass http://127.0.0.1:3010;
  37. proxy_redirect off;
  38. }
  39. # Load configuration files for the default server block.
  40. # include /etc/nginx/default.d/*.conf;
  41. # Load configuration files for the default server block.
  42. include /etc/nginx/default.d/*.conf;
  43. location /api {
  44. proxy_set_header X-Real-IP $remote_addr;
  45. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  46. proxy_set_header Host $http_host;
  47. proxy_set_header X-NginX-Proxy true;
  48. proxy_pass http://127.0.0.1:3000;
  49. proxy_redirect off;
  50. }
  51. }
  52. }

测试/api

列表

https://github.com/wenzhixin/bootstrap-table