Home  >  Q&A  >  body text

nginx - Questions about WeChat payment on WeChat official account:

There was a problem when verifying the domain name, and the third requirement could not be fulfilled:

将文件MP_verify_2lhB3AHAQ2IuIrpv.txt(点击下载)上传至填写域名或路径指向的web服务器(或虚拟主机)的目录(若填写域名,将文件放置在域名根目录下

The server is Alibaba Cloud's server,
nginx (does not use apache)


    server {
            listen       80;
            server_name  test.yuming.com;
    
            root /home/test.yuming.com/www;
            location / {
                proxy_pass   http://test.yuming.com:8009/XXX    
                ...            
            }
        }

Java web is deployed on weblogic, and the project framework is ssm

I put the txt file in the root directory, but during verification, I was still prompted to put the file in the required directory;

The other server uses apache, which can be placed in the domain name directory. It should be possible for nginx as well;
After searching on Baidu, I couldn’t find any article on configuring this thing under nginx. I don’t know if there is one. I have never used nginx to do WeChat payment. Can you give me some advice?

给我你的怀抱给我你的怀抱2713 days ago756

reply all(1)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-16 17:09:33

    The reason for this situation is that all requests are handled by your java service

    Comment proxy_pass first, then restore it after the verification is passed

    Or alternatively, add a MP_verify_2lhB3AHAQ2IuIrpv.txt route to your java project, and the content output by the page is the content of the txt file

    reply
    0
  • Cancelreply