Permission for web file in apache

Hi,
I am getting a 403 Forbidden page when accessing an index.html file from the web through the apache server.
Is that because the file does not have permission right?

Forbidden

You don't have permission to access this resource.

Apache/2.4.41 (Ubuntu) Server at mysite.com Port 80

This is what it reads at the mo'

-rw-r--r-- 1 root root 125 Nov 25 18:11 index.html

I have seen this for perms, would I use these?

chmod a+x ~ chmod a+rx html chmod a+r html/index.html

if it is not that, what else may it be please?

EDIT:

In my error logs I see these lines..

[Tue Nov 29 09:44:10.127646 2022] [access_compat:error] [pid 52158:tid 140599034373888] [client 192.168.20.1:60620] AH01797: client denied by server configuration: /var/www/mysite/data.txt
[Tue Nov 29 09:56:09.870355 2022] [access_compat:error] [pid 52158:tid 140598992410368] [client 192.168.20.1:50074] AH01797: client denied by server configuration: /var/www/mysite/
[Tue Nov 29 09:56:10.222080 2022] [access_compat:error] [pid 52158:tid 140598505895680] [client 192.168.20.1:50074] AH01797: client denied by server configuration: /var/www/mysite/favicon.ico, referer: http://www.mysite.com/

More info in case it can help.

When I place this url in browser localhost/mysite/
I get this..

Not Found

The requested URL was not found on this server.

Apache/2.4.41 (Ubuntu) Server at localhost Port 80

If I just use localhost then I do get the apache index page.

Okay I have it working now from the web with the domain name and resolving at the correct site index.html file.
Problem was in the conf files.
Just now need to secure it more.
Another thread I think.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.