QUOTE (rasclattrasman @ Apr 29 2016, 04:14 PM)
I am just wondering if any more experienced users can help with my issue. I have 3 sites, 2 on the same VPS space, 1 on regular shared hosting.
Using cURL (PHP), file_get_contents() (PHP), or fsockopen() (PHP) commands to:
The NS Shared Hosting Package:
– no errors, data can be retrieved and displayed from anywhere to this hosting package
From my one site hosted on VPS to second site hosted on VPS:
– no errors, data can be retrieved between sites on the same VPS host
From NS Shared Hosting (or any other host) to my VPS Hosting:
– error: "Failed to connect to www.example.com port 80: Connection refused"
If I navigate using my browser to the same page the PHP commands are trying to access, it pulls up fine through the browser, so the server itself works fine with regular browser traffic.
It appears the connection is being allowed localhost but not allowing external sources to request on port 80 when it comes to these type of connection types.
The question then is, does anyone know how to allow external connections like this on VPS? I have read a few posts on the internet where it says that the firewall may be too strict on port 80, but I don't mess with the firewall settings in the Virtuoso software so I really don't know what to change to try and allow these external connections. Does anyone have experience with this or have any ideas in general what to try?
The end goal is that my VPS site is an API host so it is supposed to accept hits from anywhere and return data. Like I say, the Shared Hosting package works, fine so there has to be some setting I can change on the VPS to make it do the same thing??
Any help would be appreciated!
It is likely a firewall issue. I would suggest checking the Plesk KB at https://kb.plesk.com/en/