Follow the documentation to first write a test.py file to test whether the installation was successful
1 def application (env, start_response): 2 Start_response ('kOK', [('content-type',' text/html ' )])3 return ["HelloWorld"]
As a result, neither the content nor the actual error has been displayed.
Look closely at the run Echo: there was a paragraph without using PCRE, so reinstall UWSGI
First Execute
sudo pip uninstall Uwsgi
A prompt with no directory permissions appears
Execute, sudo chown-r $ (whoami)/***/http
Then re-execute, sudo pip uninstall Uwsgi
Uninstall complete
Reinstall, this time did not use PIP install Uwsgi
Instead, download the tar package directly in the https://pypi.python.org/pypi/uWSGI/
Perform
TAR-XVF uwsgi-2.0.15.tar.gz
CD uwsgi-2.0.15
Make
Re-execute, the results always show no Python application found, check your startup logs for errors
To view the manual and discover Python3, you need to use the following code
1 def application (env, start_response): 2 Start_response ('kOK', [('content-type',' text/html ' )])3 return [b"HelloWorld"]
But still not.
Re-view the manual and find that you need to add parameters to the command line--plugin python
Execute the following command line:
Uwsgi--plugin python--http:8001--wsgi-file test.py
Re-access localhost:8001
You can see the successful display of ' Hello world '
PS: Manual for Accessories UWSGI
Https://media.readthedocs.org/pdf/uwsgi-docs-additions/latest/uwsgi-docs-additions.pdf
First Use Uwsgi:no python application found, check your startup logs for errors