Solution to the 503 error in deploying python programs in apache, python503
Preface
This article describes how to solve the 503 error in python program deployment by apahce. I will not talk about it much below. Let's take a look at the details.
Problems Found
After the server is updated today, it is found that a python program deployed using apache cannot be accessed. The error 503 is returned and the error log is as follows:
[Thu Apr 13 10:54:40 2017] [error] [client 127.0.0.1] (13) Permission denied: mod_wsgi (pid = 1814 ): unable to connect to WSGI daemon process 'trac' on '/etc/httpd/logs/wsgi.1798.0.2.sock' after multiple attempts.
Solution Process
First, the permission problem occurs. Therefore, the permission of the corresponding sock file is modified to 777, and the error 503 is found. This is also true after the httpd service is restarted. At this time, I found a problem. Why is this sock file stored in the logs directory? Generally, it should be in the/var/run directory?
Open the corresponding configuration file and find that the WSGISocketPrefix option is not configured. Then add WSGISocketPrefix/var/run/wsgi to the conf file and restart the service.
The strange thing is, how can I not report an error if I haven't configured it before? Is it because of version updates? You can leave a message to discuss it.
Summary
The above is all the content of this article. I hope the content of this article will help you in your study or work. If you have any questions, please leave a message, thank you for your support.