[GELÖST] Frisch installierter Apache leitet an falsches Verzeichnis weiter

Debian macht sich hervorragend als Web- und Mailserver. Schau auch in den " Tipps und Tricks"-Bereich.
Antworten
Njuguna
Beiträge: 69
Registriert: 28.03.2023 09:47:30

[GELÖST] Frisch installierter Apache leitet an falsches Verzeichnis weiter

Beitrag von Njuguna » 22.04.2023 13:00:45

Hi,

bei einem frisch installierten Apache-Server (Debian 11) bekomme ich diese Fehlermeldungen:

Code: Alles auswählen

[Sat Apr 22 12:47:34.281585 2023] [authz_core:error] [pid 760] [client 192.168.0.2:43840] AH01630: client denied by server configuration: /var/www/html/
[Sat Apr 22 12:47:34.531240 2023] [authz_core:error] [pid 760] [client 192.168.0.2:43840] AH01630: client denied by server configuration: /var/www/html/
Ich kann mir das jetzt nicht erklären, denn das Root-Verzeichnis ist auf "/srv/www" gesetzt in

/etc/apache2/sites-available/002-www.example.com.conf:

Code: Alles auswählen

<VirtualHost 192.168.0.8:80>
        ServerAdmin hostmaster@example.com
        DocumentRoot /srv/www/www.example.com/
        ServerName www.example.com
        ServerAlias example.com

        <Directory /srv/www/www.example.com/>
                Options +Indexes +FollowSymLinks +MultiViews
                AllowOverride All
                Require all granted
        </Directory>

        <Directory "/srv/www/www.example.com/.well-known/acme-challenge/">
                AllowOverride None
                Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
                Require method GET POST OPTIONS
        </Directory>

        Alias /Admin "/srv/www/www.example.com/typo3/"

        <Directory "/srv/www/www.example.com/typo3/">
                Order Allow,Deny
                Allow from all
                Options -Indexes +MultiViews +FollowSymLinks
                AllowOverride None
                Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/example.com-error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/example.com-access.log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

        ServerSignature On

</VirtualHost>

und in /etc/apache2/apache2.conf:

Code: Alles auswählen

DefaultRuntimeDir ${APACHE_RUN_DIR}

PidFile ${APACHE_PID_FILE}

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 5


User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log

LogLevel warn

IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

Include ports.conf


<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>

<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>


<Directory /srv/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>




AccessFileName .htaccess

<FilesMatch "^\.ht">
        Require all denied
</FilesMatch>


LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent


IncludeOptional conf-enabled/*.conf

IncludeOptional sites-enabled/*.conf
Wo kann der Server noch das Default-Rootverzeichnis konfiguriert haben, dass alles Andere überschreibt?

Grüße
Njuguna
Zuletzt geändert von Njuguna am 22.04.2023 13:15:25, insgesamt 1-mal geändert.

Njuguna
Beiträge: 69
Registriert: 28.03.2023 09:47:30

Re: Frisch installierter Apache leitet an falsches Verzeichnis weiter

Beitrag von Njuguna » 22.04.2023 13:15:07

Da war noch die 000-default.conf aktiv gesetzt. Problem gelöst.

Antworten