I have a cloud instance of Ubuntu 18.04, which is running Apache2 and some Python services. My JS web app tries to fetch data from a Python service but it results to error "connection refused". Python service has CORS enabled and it responses to curl. I also configured ProxyPass for this service in Apache, so when I access the service URL directly with browser, I get the response.
I also have a laptop with Ubuntu 18.04, running apache. The app works fine there. I was comparing the Apache .conf files but couldn’t find any major differences.
In my older server I had the same problem but I got it solved by using PHP. In this new app I’d rather use JavaScript.
What could be preventing JS from fetching data?
I opened the port that the Python service is using in my cloud's security group and now it is working!