Where should the root (index.html) be located?

I have mine located in var/www/html and it worked for 2 years, but now it doesn't.

4 Replies

To quote a serverfault post with a very similar question:

"The correct place to put the site depends on the configuration of your web server. If you need to find what the root of the server (for the virtual host if hosting multiple sites) is, this is specified with DocumentRoot - so go to the Apache config files (normally in /etc/Apache or /etc/apache2 or /etc/httpd and look for that directive.

/var/www/html is the typical/default location.

You should keep in the back if your mind that it is possible to override locations with "alias" directives - although these are typically used to graft programs web interfaces into a path and have a subdirectory associated with them."

Beyond that boilerplate response, some good questions to ask are:

When your site resolves are you getting any errors?

Have you checked any error logs, and if so, what did those say?

For Apache they should be located at:

var/log…apache2

Did the permissions/ownership change for the root file change recently?

Did you restart your web server recently?

If you have not, maybe give that a go by running:

sudo systemctl restart apache2

Did you blow your browser cache?

Hopefully that helps resolve your issue.

-Micah

I've also gathered that this ongoing issue has been at the very least disruptive, if not outright distressing, so it may be worth contacting a freelance System Administrator to attempt to help get things back on track. Before accepting any help, I strongly urge you to backup your data and create a limited user on your account since Linode is not able to take responsibility for anything caused by third-party sources.

For more information about finding help this way, you may want to check out sites like Fiverr or UpWork:

/etc/apache2 shows the root path as var/www/html

looked at the error log which shows "/etc/ssl/certs/warrgames_net.crt and /etc/ssl/certs/warrgames.net.key do not match"

I put nothing in the index.html related to SSL. In fact, I removed all references to "https"

It doesn't work.

This may be caused because I cannot get apache2 to start. It says
" Syntax error on line 3 of /etc/apache2/conf-enabled/other-vhosts-access-log.conf:" There is nothing in that file.

I tried to reinstall apache2, but I get the same errors.cd

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