What Directory Do My Website's Files Reside In?

Linode Staff

I'm trying to find the directory where my website's files reside in, so that I can upload new files and images. How can I find this on my server?

4 Replies

Linode Staff

You can check the virtual host file for your website and check the "DocumentRoot" setting. This should point to the directory where your website's files exist. Depending on how your Apache web service is configured, the virtual host file may reside under the "/etc/apache2/sites-available" directory. We have a guide that you can reference for assistance with this.

Apache Virtual Host File

You can also verify this using the "apache2ctl -S" command. Here's an example from my personal server, where the "DocumentRoot" setting is set to the "/var/www/html" directory.

# apache2ctl -S
VirtualHost configuration:
Main DocumentRoot: "/var/www/html"

Sorry, I don't know how to do that

Hello,

I input apache2ctl -S but I still can't find the path of the site files

Linode Staff

@lzp2057 do you mind posting the output of apache2ctl -S from your Linode?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct