我的服务器9096端口上有一个可运行的rsync服务器。我尝试使用nginx将来自端口873的传入流量重新路由到我的rsync服务器中。
user nginx;
worker_processes 16;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
stream {
upstream rsync{
server energos.energia:9096;
}
server {
listen 873;
proxy_pass rsync;
}
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 120;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
Rsync正在响应rsync -rdtv rsync://myrealdonainname.com:9096 /,因此rsync服务器还可以,但nginx不在工作。
谢谢。