Go框架demo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.8 KiB

3 years ago
  1. # baidu_link_submit_ms.private.conf
  2. # baidu_link_submit_ms nginx config file.
  3. #
  4. # This file auto generated by baidu_link_submit_ms/scripts/init_config.sh,
  5. # [WARRING!] DO NOT change this manualy.
  6. #
  7. # @version 170227:1
  8. # @author zhangxuhong <zhangxuhong@xitu.io>
  9. #
  10. upstream baidu_link_submit_ms_private {
  11. server 127.0.0.1:10100;
  12. keepalive 64;
  13. }
  14. server {
  15. listen 8000;
  16. server_name baidu-link-submit-ms.juejin.im;
  17. default_type 'text/plain'; # or browser will download page
  18. include /data/apps/nginx/conf/origin/gold.xitu.io_and_juejin.im.conf;
  19. root /data/repo/baidu_link_submit_ms;
  20. access_log /data/repo/baidu_link_submit_ms/logs/nginx-access.public.log logstash;
  21. error_log /data/repo/baidu_link_submit_ms/logs/nginx-error.public.log;
  22. client_body_temp_path /data/logs/nginx/client_body_temp/ 1 2;
  23. proxy_temp_path /data/logs/nginx/proxy_temp/ 1 2;
  24. # X-Juejin-Src for api src trace back
  25. # X-Juejin-Uid for non-login user id
  26. # X-Juejin-Token for api param hash check
  27. add_header 'Access-Control-Allow-Headers' 'X-Juejin-Src,X-Juejin-Uid,X-Juejin-Token' always;
  28. if ($request_method = OPTIONS ) {
  29. return 200;
  30. }
  31. # global location settings
  32. location /status {
  33. return 200;
  34. }
  35. location / {
  36. proxy_set_header X-Real-IP $remote_addr;
  37. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  38. proxy_set_header Host $http_host;
  39. proxy_set_header X-Nginx-Proxy true;
  40. proxy_pass http://baidu_link_submit_ms_private;
  41. }
  42. location ~ /\. {
  43. deny all;
  44. access_log off;
  45. log_not_found off;
  46. }
  47. }