0

I have a VPS where I have uploaded some files in the root directory. I want to access those files on my website (developed in PHP) which is hosted on a shared server. Is it possible?

I have searched on internet but found nothing. Need some guidance.

thanks

  • 1
    Please define "root directory". Is it the root directory of the machine (the OS) or the web servers document root? If it's the root directory of the machine, then you need to either use SSH to connect to the machine with a user that has read permissions for the root directory, or you can create an API/proxy page on that machine that returns the files you need. The question is a bit unclear atm. – M. Eriksson Jul 14 '21 at 06:18
  • Sorry I am a newbie. Its root directory of apache webserver. OS is Ubuntu – Aamir Bashir Jul 14 '21 at 06:29

1 Answers1

0

I presume you have 2 servers, one is the VPS and another is the shared hosting one.

You can access those files in a few ways.

  • Open a SSH connection from your shared host to the VPS
  • Setup a FTP server on the VPS and use a FTP connection from the shared hosting to the VPS
  • Setup a PHP script (with some kind of authentication) to serve the files via an API.
ikyuchukov
  • 565
  • 3
  • 12