Keep on getting a 403 Forbidden error with httpd

Issues related to applications and software problems
dbl
Posts: 11
Joined: 2019/06/05 00:06:01

Keep on getting a 403 Forbidden error with httpd

Post by dbl » 2019/06/05 00:13:07

I've been configuring a web server to use with Sonerezh and whenever I go to myurl.tld I get a 403 error

Things I've tried so far:
Disabling SELinux
Checking read/write permissions
God knows what else after 2 hours of googling

As far as I can tell all the conf files are right.

mghe
Posts: 766
Joined: 2015/11/24 12:04:43
Location: Katowice, Poland

Re: Keep on getting a 403 Forbidden error with httpd

Post by mghe » 2019/06/05 07:21:45

What do You have in logs? Could You show error log, please.

dbl
Posts: 11
Joined: 2019/06/05 00:06:01

Re: Keep on getting a 403 Forbidden error with httpd

Post by dbl » 2019/06/05 15:11:03

I will once I'm back home. Unfortunatly I don't have SSH connectability at school.

dbl
Posts: 11
Joined: 2019/06/05 00:06:01

Re: Keep on getting a 403 Forbidden error with httpd

Post by dbl » 2019/06/05 16:22:37

Code: Select all

[Tue Jun 04 18:24:07.751147 2019] [autoindex:error] [pid 320] [client 192.168.1.1:45034] AH01276: Cannot serve directory /var/www/html/MusicTime/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 18:24:09.223404 2019] [autoindex:error] [pid 320] [client 192.168.1.1:45034] AH01276: Cannot serve directory /var/www/html/MusicTime/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 18:24:09.879607 2019] [autoindex:error] [pid 320] [client 192.168.1.1:45034] AH01276: Cannot serve directory /var/www/html/MusicTime/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 18:24:10.342409 2019] [autoindex:error] [pid 320] [client 192.168.1.1:45034] AH01276: Cannot serve directory /var/www/html/MusicTime/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 18:24:10.761232 2019] [autoindex:error] [pid 320] [client 192.168.1.1:45034] AH01276: Cannot serve directory /var/www/html/MusicTime/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 18:40:30.890214 2019] [autoindex:error] [pid 25410] [client 192.168.1.1:45222] AH01276: Cannot serve directory /var/www/html/MusicTime/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 18:40:58.041335 2019] [autoindex:error] [pid 24617] [client 192.168.1.1:45290] AH01276: Cannot serve directory /var/www/html/MusicTime/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 18:45:04.992687 2019] [autoindex:error] [pid 30386] [client 192.168.1.1:45316] AH01276: Cannot serve directory /var/www/html/MusicTime/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 18:59:17.606738 2019] [autoindex:error] [pid 4079] [client 192.168.1.1:45646] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:03:52.363677 2019] [autoindex:error] [pid 4080] [client 192.168.1.1:45818] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:03:53.409174 2019] [autoindex:error] [pid 4080] [client 192.168.1.1:45818] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:06:25.177377 2019] [autoindex:error] [pid 4091] [client 192.168.1.1:46026] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:06:26.070878 2019] [autoindex:error] [pid 4091] [client 192.168.1.1:46026] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:06:26.272160 2019] [autoindex:error] [pid 4091] [client 192.168.1.1:46026] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:06:26.465787 2019] [autoindex:error] [pid 4091] [client 192.168.1.1:46026] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:06:26.654725 2019] [autoindex:error] [pid 4091] [client 192.168.1.1:46026] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:06:26.831266 2019] [autoindex:error] [pid 4091] [client 192.168.1.1:46026] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:07:21.116094 2019] [autoindex:error] [pid 8835] [client 192.168.1.1:46028] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:07:21.792496 2019] [autoindex:error] [pid 8835] [client 192.168.1.1:46028] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:07:22.002751 2019] [autoindex:error] [pid 8835] [client 192.168.1.1:46028] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:07:22.187411 2019] [autoindex:error] [pid 8835] [client 192.168.1.1:46028] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:07:22.375993 2019] [autoindex:error] [pid 8835] [client 192.168.1.1:46028] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:11:45.889908 2019] [autoindex:error] [pid 8832] [client 192.168.1.1:46250] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:11:46.771081 2019] [autoindex:error] [pid 8832] [client 192.168.1.1:46250] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:11:47.354335 2019] [autoindex:error] [pid 8832] [client 192.168.1.1:46250] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:11:47.673764 2019] [autoindex:error] [pid 8832] [client 192.168.1.1:46250] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:15:28.722470 2019] [autoindex:error] [pid 5301] [client 192.168.1.1:46552] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:15:29.467146 2019] [autoindex:error] [pid 5301] [client 192.168.1.1:46552] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:15:29.653956 2019] [autoindex:error] [pid 5301] [client 192.168.1.1:46552] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:15:29.870432 2019] [autoindex:error] [pid 5301] [client 192.168.1.1:46552] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:15:30.053532 2019] [autoindex:error] [pid 5301] [client 192.168.1.1:46552] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:15:34.821574 2019] [autoindex:error] [pid 5301] [client 192.168.1.1:46552] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:19:00.203065 2019] [autoindex:error] [pid 11018] [client 192.168.1.1:46554] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:23:22.871557 2019] [autoindex:error] [pid 11022] [client 68.133.11.100:21518] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:29:03.244916 2019] [autoindex:error] [pid 11021] [client 68.133.11.100:21829] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:40:37.081285 2019] [autoindex:error] [pid 11023] [client 192.168.1.1:46556] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:41:31.961852 2019] [autoindex:error] [pid 6274] [client 192.168.1.1:46558] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 19:57:17.451879 2019] [autoindex:error] [pid 5450] [client 192.168.1.1:46860] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 20:03:44.993099 2019] [autoindex:error] [pid 6863] [client 192.168.1.1:51238] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Jun 04 20:49:59.748587 2019] [autoindex:error] [pid 5394] [client 68.133.11.100:25337] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Jun 05 07:30:46.990912 2019] [autoindex:error] [pid 5394] [client 168.169.225.23:52179] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Jun 05 12:13:37.623487 2019] [autoindex:error] [pid 5393] [client 172.58.232.192:33154] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Jun 05 12:18:21.818692 2019] [autoindex:error] [pid 5394] [client 172.58.232.192:44013] AH01276: Cannot serve directory /var/www/html/MusicTime/sonerezh/app/webroot/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
This is the error log.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Keep on getting a 403 Forbidden error with httpd

Post by TrevorH » 2019/06/05 16:38:45

So there is no file in there that you have told apache httpd to load if there is not one specified. The files it looks for are specified by using e.g. "DirectoryIndex index.html" in the apache config.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

dbl
Posts: 11
Joined: 2019/06/05 00:06:01

Re: Keep on getting a 403 Forbidden error with httpd

Post by dbl » 2019/06/05 20:34:49

There is a file specified however. For reference this is what I see when I go to the site

Image

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Keep on getting a 403 Forbidden error with httpd

Post by hunter86_bg » 2019/06/06 03:20:42

You try to access /app/webroot . The main question now is if it is empty or not.
Also, better don't completely disable SELINUX, but let it work in the background via 'permissive' mode.If you decide to set it into permissive mode, you will need a full relabel.

dbl
Posts: 11
Joined: 2019/06/05 00:06:01

Re: Keep on getting a 403 Forbidden error with httpd

Post by dbl » 2019/06/06 10:40:24

/app/webroot is not empty, It has the index file in it.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Keep on getting a 403 Forbidden error with httpd

Post by hunter86_bg » 2019/06/06 22:06:54

Sure.
What are the permissions of the directory and it's content -owner & group?
Apache starts as root, but after that it drops it's privileges and is not allowed to access anything outside of the conf directory or the Document Root.

Edit: What are your Virtual Host's settings ?

dbl
Posts: 11
Joined: 2019/06/05 00:06:01

Re: Keep on getting a 403 Forbidden error with httpd

Post by dbl » 2019/06/07 11:48:17

The entire /var/www/html/MusicTime is under the apache owner and group. What do you mean by virtual hosts settings?

Post Reply