# REPO_NAME.private.conf # REPO_NAME nginx config file. # # This file auto generated by REPO_NAME/scripts/init_config.sh, # [WARRING!] DO NOT change this manualy. # # @version 170227:1 # @author zhangxuhong # upstream REPO_NAME_private { server UPSTREAM_ADDR; keepalive 64; } server { listen 8000; server_name DOMAIN_NAME; default_type 'text/plain'; # or browser will download page include /data/apps/nginx/conf/origin/gold.xitu.io_and_juejin.im.conf; root /data/repo/REPO_NAME; access_log /data/repo/REPO_NAME/logs/nginx-access.public.log logstash; error_log /data/repo/REPO_NAME/logs/nginx-error.public.log; client_body_temp_path /data/logs/nginx/client_body_temp/ 1 2; proxy_temp_path /data/logs/nginx/proxy_temp/ 1 2; # X-Juejin-Src for api src trace back # X-Juejin-Uid for non-login user id # X-Juejin-Token for api param hash check add_header 'Access-Control-Allow-Headers' 'X-Juejin-Src,X-Juejin-Uid,X-Juejin-Token' always; if ($request_method = OPTIONS ) { return 200; } # global location settings location /status { return 200; } location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Nginx-Proxy true; proxy_pass http://REPO_NAME_private; } location ~ /\. { deny all; access_log off; log_not_found off; } }