I need to test my php script for APNS on the VPS. I already set up apache and php server, i have my php script in place. But when i try to send a push notification from wordpress plugin, it say “connection failed”. How can i check if the 2195 & 2196 ports are open in my VPS? And if are closed, how can i open them? many thanks
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Check out <a href=“https://www.digitalocean.com/community/articles/how-to-setup-a-firewall-with-ufw-on-an-ubuntu-and-debian-cloud-server”>How to Setup a Firewall with UFW on an Ubuntu and Debian Cloud Server</a>; although if you did not previously set up a firewall, then it would not be a firewall blocking those ports. <br> <br>Perhaps you have permissions issues. Check the <code>owner:group</code> attributes of your WordPress installation. What’s the output of: <br><pre>ls -la /path/to/WordPress/installation/</pre> <br>If you see <code>root:root</code> sprinkled in there, execute: <br><pre>sudo chown -R www-data:www-data /path/to/WordPress/installation/</pre>