How do I upload an html file to my server?

October 22, 2015 11.1k views
DigitalOcean Nginx

Hello, I have an html file and a droplet created running a debian server. I can successfully access the droplet through terminal and filezilla, and am able to FTP to it. However, there is no "www" folder inside /var/ where I can upload my html file. I can access the server by using the IP address of the server, and the website reads "Welcome to nginx on Debian." I need to upload my own html file on that website. Thanks!

1 Answer

On Debian html folder is usually located in /var/www/html/. But it can also be in /usr/share/nginx/html/ directory.

You can also check nginx config file and see where the root option is set to by running command below via SSH.
cat /etc/nginx/sites-enabled/default | grep "root"

  • Hey!
    I checked both locations however I still don't have a /www/ inside var or a /nginx/ inside the /usr/share/ directory.
    I ran the command:
    root@mondalju:~# cat /etc/nginx/sites-enabled/default | grep "root"
    root /var/www/html;
    # deny access to .htaccess files, if Apache's document root

    root /var/www/;

    I'm using FileZilla to sftp to the IP Address of the droplet.

    I also ran nano /etc/nginx/sites-enabled/default
    to verify the location and it also gave back root/var/www/.

    Did I not set up something correctly?
    When I access the IP address it display welcome to nginx on debian, so I assume I set up the server correctly...

Have another answer? Share your knowledge.