Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
nginx配置
upstream swooletest{
  server 127.0.0.1:9501;
  keepalive 4;
}
server{
  listen 80;
  server_name www.server.com;
  root /home/www/cyonks;
  location /{
    proxy_pass http://swooletest$request_uri;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Connection "";
    proxy_http_version 1.1;
  }
}

配置hosts文件

127.0.0.1 www.server.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment