When registering your own website on another website, you often need to upload the verification file to the root directory of the domain name, such. Today, we can see in a group that some people are discussing this topic very lively. This issue is not a matter of program development, but of O & M. However, in most small companies, it is not as clear as possible, and programmers also perform O & M.
Background: This is a Django group.
Worker is treated as a dynamic page.
In fact, you don't need to modify the code. You can simply use nginx or apache. It's very simple. paste the Code directly. I use nginx.
Server {listen 80; server_name example.com; location/root.txt {# Must be placed before location/root/path/to/directory; folder where the root.txt file is located} location/{include uwsgi_params; uwsgi_pass 127.0.0.1: 8630; # Django port }}
Isn't it easy? This method is generic and can be used on websites in almost all languages, such as PHP and Python, because it has nothing to do with the language and belongs to the category of web servers.