Trying To Locate My Website's files

Linode Staff

My website recently stopped working and I'm having trouble locating my files related to it. How can I locate my files?

1 Reply

You can use the "find" command to try locating the files for your website. Here's an example of the command for a website, "chiz.tk", that I'm hosting on my personal server. This allows me to search for files related to my website.

sudo find / -name *chiz*

I also recommend checking the virtual host file for your domain to verify that the "DocumentRoot" path is pointing to the directory where your website's files exist. For my personal server, this is the path entry within my server's virtual host file:

DocumentRoot /var/www/html

You can also test this using the "apache2ctl" command. Here's an example from my personal server:

root@www:~# /usr/sbin/apache2ctl -S
VirtualHost configuration:
*:443                  www.chiz.tk (/etc/apache2/sites-enabled/000-default-le-ssl.conf:8)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33

I also suggest checking to ensure that the registration for your domain hasn't expired and that your domain's 'A' record is pointing to the IP address that hosting your website. You can check your domain's registration status using "Whois.com" To check your domain's IP address, you can use the "dig" command.

https://www.whois.com/whois/
dig your_domain_name +short

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