# wechat_dev_verify **Repository Path**: hww/wechat_dev_verify ## Basic Information - **Project Name**: wechat_dev_verify - **Description**: 微信开发者验证服务器有效性,sinatra+puma - **Primary Language**: Ruby - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2015-07-21 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ###后端部署 - git clone https://git.oschina.net/hww/wechat_dev_verify.git - cd wechat_dev_verify - bundle install - bundle exec puma -C config/puma.rb ###Nginx前端代理 - upstream 在Nginx的配置文件nginx.conf中添加upstream ``` http{ ... upstream puma{ server 127.0.0.1:3000 fail_timeout=0; } ... } ``` - sites-enable中配置location ``` server{ ... try_files $uri/index.html $uri.html $uri @puma; location /{ try_files $uri $uri/index.html $uri.html @puma; } location @puma{ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; ... # This passes requests to unicorn, as defined in /etc/nginx/nginx.conf proxy_pass http://puma; ... } ... } ``` 另外我在这里把token写死在app.rb文件中,建议用配置文件比较好。默认的token为huangwenwei 如果使用者没有修改的话,在微信开发中心的网页上token需要填写``` huangwenwei ```