# baidu_link_submit_ms.private.conf
|
|
# baidu_link_submit_ms nginx config file.
|
|
#
|
|
# This file auto generated by baidu_link_submit_ms/scripts/init_config.sh,
|
|
# [WARRING!] DO NOT change this manualy.
|
|
#
|
|
# @version 170227:1
|
|
# @author zhangxuhong <zhangxuhong@xitu.io>
|
|
#
|
|
|
|
upstream baidu_link_submit_ms_private {
|
|
server 127.0.0.1:10100;
|
|
keepalive 64;
|
|
}
|
|
|
|
server {
|
|
listen 8000;
|
|
server_name baidu-link-submit-ms.juejin.im;
|
|
|
|
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/baidu_link_submit_ms;
|
|
access_log /data/repo/baidu_link_submit_ms/logs/nginx-access.public.log logstash;
|
|
error_log /data/repo/baidu_link_submit_ms/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://baidu_link_submit_ms_private;
|
|
}
|
|
|
|
location ~ /\. {
|
|
deny all;
|
|
access_log off;
|
|
log_not_found off;
|
|
}
|
|
|
|
}
|