【6】使用nginx
sudo vim /etc/nginx/nginx.conf
user root; worker_processes 2; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { use epoll; worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; access_log /var/log/nginx/access.log; sendfile on; #tcp_nopush on; # set connect timeout keepalive_timeout 65; tcp_nodelay on; # open gzip gzip on; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; # this is the real tornado service upstream tornado { server 127.0.0.1:8000 weight=10; server 127.0.0.1:8001 weight=10; server 127.0.0.1:8002 weight=10; server 127.0.0.1:8003 weight=10; } server { listen 80; root /home/fc.cs/FC.Service/FC.EEService; server_name server; location / { proxy_pass_header Server; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; proxy_pass http://tornado; } } }
sudo gedit /etc/nginx/sites-enabled/default
端口改为21