In order to find out the version of the software you need, you need to connect to the VPS/dedicated server via SSH. And enter the appropriate commands.
To find out the version of PHP:
php -v
nginx version:
nginx -v
mysql:
mysql -V
Apache:
On CentOS 6, 7:
httpd -v
On Debian 7, 8 and Ubuntu 16, 18:
apachectl -v