Aug-16-2018, 01:42 PM
In on of my Django view´s I am making a request to another webserver via requests, this code works perfect when I run the it with the development server. It looks like that:
Thanks in advance!
import requests r = requests.post('http://www.example.org') return r.textBut when I Deploy this with the apaches server it throws this error:
Error:ConnectionError
HTTPConnectionPool(host='www.example.com', port=80): Max retries exceeded
with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection
object at 0x7f23e917ba58>:Failed to establish a new connection:[Errno -2]
Name or Service not known'))
But I can run the code as root user on the Deployment server without a problem this is why i think it is a permission problem. But i have no Idea how to solve this. Thanks in advance!