Score:0

Where to put files into my Ubuntu server so I can access them publicly from a web browser?

ng flag

Sorry if this is a very dumb question, but I'm totally new to server administration. I already know how to add files to a web hosting solution through FTP/SFTP, however I have no idea how I can do this with a server.

I just got access to an Ubuntu server, successfully connected to it with SSH and also sent a file there with SCP.

However, I have no idea how I can publicly access the files that I add to my server.

For example, I haved added a test.txt file to my server in the /home directory, and now I would like to be able to access it, but I'm absolutely lost about what to do now. I tried accessing http://{my_server_ip}/home/test.txt from my web browser, but with no chance.

What should I do here?

Thank you for your help

Score:1
gq flag

To display you files on a webpage what you would like to do if you try to access http://{my_server_ip}/home/test.txt you need to have an application that serves that webpage.

One of the common applications doing this are apache2 or ngnix.

Ubuntu has a tutorial how to setup apache2 to serve you an webpage: https://ubuntu.com/tutorials/install-and-configure-apache#1-overview

Another Dude avatar
ng flag
Thank you, I did that and it works fine.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.