Question

How do I upload an html file to my server?

Posted October 22, 2015 12.3k views
NginxDigitalOcean

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!

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.

×
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/example.com;

    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…

Submit an Answer