简体   繁体   English

如何在Linux VPS上获取我的文件的直接下载链接

[英]How do i get a direct download link for my file on Linux VPS

I have recently just got a subscription to a Linux VPS (Ubuntu) 我最近刚刚订阅了Linux VPS(Ubuntu)

I have logged into the VPS using FileZilla and uploaded my .png file to the VPS. 我已经使用FileZilla登录到VPS,并将我的.png文件上传到VPS。 But when i travel to the ip address in my web browser then i am unable to navigate to the directory for the file. 但是,当我在Web浏览器中访问ip地址时,则无法导航到该文件的目录。 I have apache2 running on the web server so when i navigate to the VPS using my browser it says this 我的Web服务器上运行着apache2,因此当我使用浏览器导航到VPS时,它会说这

It works! 有用!

This is the default web page for this server. 这是此服务器的默认网页。

The web server software is running but no content has been added, yet. Web服务器软件正在运行,但尚未添加任何内容。

Can someone please teach me on how to upload my .png file correctly so i can have a download link something similar to 有人可以教我如何正确上传我的.png文件,这样我可以得到一个类似于以下内容的下载链接

http://myipaddress.com/home/files/mypicture.png http://myipaddress.com/home/files/mypicture.png

Would highly appreciate any knowledge applicable to my problem. 高度赞赏适用于我的问题的任何知识。 If someone helps me solve the problem then i will happily tip them some cryptocurrency :) 如果有人帮助我解决问题,那么我会很乐意给他们一些加密货币:)

You must put your public files in the directory published by the web server: the "DocumentRoot". 您必须将公共文件放在Web服务器发布的目录中:“ DocumentRoot”。

By example, it may be: 例如,它可能是:

/var/www

The published files must also be readable by the Web Server process. 发布的文件还必须可由Web Server进程读取。 The Apache server on Debian runs with the "www-data" user/group, by default. 默认情况下,Debian上的Apache服务器以“ www-data”用户/组运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM