Apache Webserver Error 403

Hello all,

on my Manjaro-server I am runninng into an 403-error.

The document-root /srv/http and all of its subdirs (wordpress) belongs to the user http and group root.

Any idea?

Thank-you!

CJC

paste here apache log errors and run ls -l on file in log

tail /var/log/httpd/error_log
PHP Warning:  Module "mysqli" is already loaded in Unknown on line 0
[Wed Jun 30 20:25:00.906445 2021] [mpm_prefork:notice] [pid 493] AH00163: Apache/2.4.47 (Unix) PHP/8.0.6 configured -- resuming normal operations
[Wed Jun 30 20:25:00.906492 2021] [core:notice] [pid 493] AH00094: Command line: '/usr/bin/httpd -D FOREGROUND'
[Thu Jul 01 08:06:54.670514 2021] [mpm_prefork:notice] [pid 493] AH00170: caught SIGWINCH, shutting down gracefully
AH00112: Warning: DocumentRoot [/etc/httpd/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [/etc/httpd/docs/dummy-host2.example.com] does not exist
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
PHP Warning:  Module "mysqli" is already loaded in Unknown on line 0
[Thu Jul 01 08:06:54.778348 2021] [mpm_prefork:notice] [pid 82293] AH00163: Apache/2.4.48 (Unix) PHP/8.0.7 configured -- resuming normal operations
[Thu Jul 01 08:06:54.778404 2021] [core:notice] [pid 82293] AH00094: Command line: '/usr/bin/httpd -D FOREGROUND'

and

ls -l /var/log/httpd/error_log
-rw-r--r-- 1 root root 6275723  1. Jul 08:06 /var/log/httpd/error_log

find 403 in logs :wink:
and ls -l on file found in log …

Thank-you.

It is strange, because I called the website (192.168.0.100) several times and afterwards

cat /var/log/httpd/error_log | grep 403

but the results dated on days before, even last week, but not today.

The status after a restart:
httpd.service - Apache Web Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2021-07-01 09:57:43 CEST; 7s ago
Main PID: 84532 (httpd)
Tasks: 7 (limit: 19051)
Memory: 24.7M
CGroup: /system.slice/httpd.service
├─84532 /usr/bin/httpd -k start -DFOREGROUND
├─84534 /usr/bin/httpd -k start -DFOREGROUND
├─84535 /usr/bin/httpd -k start -DFOREGROUND
├─84536 /usr/bin/httpd -k start -DFOREGROUND
├─84537 /usr/bin/httpd -k start -DFOREGROUND
├─84538 /usr/bin/httpd -k start -DFOREGROUND
└─84539 /usr/bin/httpd -k start -DFOREGROUND

Jul 01 09:57:43 ManjaroServer systemd[1]: Started Apache Web Server.
Jul 01 09:57:43 ManjaroServer httpd[84532]: AH00112: Warning: DocumentRoot [/etc/httpd/docs/dummy-host.example.com] does not exist
Jul 01 09:57:43 ManjaroServer httpd[84532]: AH00112: Warning: DocumentRoot [/etc/httpd/docs/dummy-host2.example.com] does not exist
Jul 01 09:57:43 ManjaroServer httpd[84532]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this >

Regards, CJC

HTTP 403 is an access forbidden error - those won’t show up in the error.log but in the access.log.

Thank-you.

tail /var/log/httpd/access_log

shows nothing.

On the other hand the 192.168.0.100/nextcloud answers correctly. So the apache works but does not allow the 192.1680.100/ ? But why?

I am glad I found the solution myself: The following warning shows the cause of the error. I had to configure the virtual host directive

vi /etc/httpd/conf/extra/httpd-vhosts.conf

with the appropriate parameters.

Thank you all for your support

I saw that and was going to point that out, but I moved on (too much threads opened and I forgot to reply).

Glad you fixed it.