I have installed a NodeJS module on a Digital Ocean Droplet. It generates a csv file that I store in the directory root/csv_file/my_file.csv
.
However, I cannot access it in the browser by simply visiting ip_address/csv_file/my_file.csv
.
I read this question which asks me to install http-server
so I installed it. After that I ran the following command:
http-server csv_file
and
http-server root
However, none of the allowed me to access the file by visiting root/csv_file/my_file.csv
.
Using the file_get_contents()
function in PHP gives me the following error:
No connection could be made because the target machine actively refused it.
How can I access this file preferably in PHP or in browser?
Thanks.