How to access a www/ directory on my droplet?

June 27, 2017 728 views
Nginx Apache Ubuntu 16.04

Hello,
I have a simple droplet with the latest Ubuntu version, I would like to share with the outter world some documents with a link like
http://XX.XX.XX.XX/www/myFiles
Where the XXX... is the IP of my droplet
How may I do that? It looks like the tuto of Digital Ocean is not up to date.
Thanks in advance,
regards,
Xavier

4 Answers

Install a webserver, have them navigate to the URL, or create a page with a link to the file. This is a google question.

Hi @prudentxavier

Are you using Windows, OS X or Linux on your computer?
Did you setup the droplet yourself or did you use a one-click app?
Did you setup the droplet with password or SSH key?

Hello Hansen,
I am using mac os 10.9.5, even though I don't think that information is relevant as I log to my droplet using ssh.
The setup? Well, I just paid for a server and started to log in.
Regards,
Xavier

  • @prudentxavier
    Then you can login and probably go to the directory /var/www/, which is the default location of many web servers.
    Or you can use https://cyberduck.io/ or https://filezilla-project.org/ if you prefer to have a visual interface.

    • 1) by itself this will do nothing
      2) Are you suggesting anonymous FTP? This is a terrible idea.
      3) Unless he set it explicitly, the image should not include a webserver.

      He just needs to set up a webserver, and that's a google away.

      PS:
      it's usually /var/www/html/ these days, though officially nginx has a different default, most installalations look to see if /var/www/html exists and uses that instead for its defaults.

        1. Do you know if he has setup a web server yet or using a one-click?
        2. Where do you see any mentioning of FTP?
        3. Bullet 1.

        Most newcomers use Apache, which defaults to /var/www/html, but like you state, Nginx uses /var/www for Ubuntu (and probably other OS).

      • Hello,
        So if I understand, I need to set up a webserver, apparently different options exist, nginx, Apache, ftp... would you recommend me a particular one?
        Thanks,
        Xavier

        • @prudentxavier
          You should probably start by using the One-Click Apps offered when you create the droplet, since it will setup everything for you.
          And I would recommend Nginx, but that's a preference.
          Never-ever use FTP, use SFTP, which is the "light" version of SSH, so just as secure, but just with less features.

        • FTP is not a webserver; it is an insecure and obsolete File Transfer Protocol.

          You want a webserver, setting it up is a google question, there are countless guides, many hosted here on DO.

        • @prudentxavier
          You have to remember that running a server on DigitalOcean requires some skill and that you are responsible for maintaining the server (keeping it up-to-date and secure).
          If you just want to share some files, why don't you use Dropbox or Google Drive or something like that?

Hello Hansen, that is a much relevant remark.
My goal is simply to be able to share a file which is going to be regularly produced on the droplet.

Have another answer? Share your knowledge.