Skip to content

Instantly share code, notes, and snippets.

@cyonks
Created January 7, 2016 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyonks/3ddafe5eade60647b5bd to your computer and use it in GitHub Desktop.
Save cyonks/3ddafe5eade60647b5bd to your computer and use it in GitHub Desktop.
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