proxy_set _header Host $host;

scan724發表於2020-11-13

node2:/etc/openrestry#cat taohui.conf 
events
    {
        use epoll;
        worker_connections 65535;
        multi_accept on;
    }

http
    {
        default_type  application/octet-stream;
        server_tokens off;
  log_format  main  '[$host]|[$realip_remote_addr]- $remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for" "$request_filename"';
 #access_log off;
        access_log  logs/access.log  main;


 upstream scan20201113 {
    server 192.168.137.2:8080      weight=5;
   
}

##upstream backend 位置放錯了, upstream位置應該放在http模組裡面 但必須是在server模組的外面

 server
 {
 listen 80;
 #server_name_in_redirect on;

相關文章