Question

Accessing files on new server.

  • Posted November 7, 2013

I created a new LAMP stack using the Applications tab. Then, using the terminal, I added PHPmyAdmin. I now want to up load files via SFTP so that I can access them. I successfully logged into SFTP using Transmit and created a new folder /test and put a file in it /test/test.html Then I went to my IP: http://192.241.253.239/test/test.html and I also tried http://192.241.253.239//root/test/test.html but both times received a 404 page. What am I doing wrong?

Thanks!

Steve

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

On the web, when you navigate to your site, the web server will read (i.e. look for files in) the web server’s root directory as defined in the Apache configuration file. As noted by @calidays81, Apache’s default (web) root directory is <code>/var/www</code>. <br> <br>You’re more than welcome to have your web server serve files from <code>/test</code>; but that’ll require that you modify Apache’s configuration file so that it knows to look for files in <code>/test</code>, as opposed to <code>/var/www</code>. <br> <br>You didn’t specify the OS you’re running. Assuming it’s Ubuntu, check out <a href=“https://www.digitalocean.com/community/articles/how-to-set-up-apache-virtual-hosts-on-ubuntu-12-04-lts”>How To Set Up Apache Virtual Hosts on Ubuntu 12.04 LTS</a> for an illustration on configuring Apache.

Thanks!

Steve, <br> <br>Create your folder in /var/www/html which is the default Apache path and put your test.html file in there . then you should be able to access it through the browser. <br> <br>Alex