获取微信用户授权信息,先在公众号平台设置网页授权域名。
先将txt文件下载并上传到服务器某个目录下。nginx安装完成,并修改nginx.conf配置文件如下:
upstream www.yiqihoo.com{
server 127.0.0.1:8080;
}
server {
listen 80;
server_name www.yiqihoo.com;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
# proxy_pass http://www.yiqihoo.com;
root /home/lishuaikang/packs/wxpay/;
# index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:90