androxin
Goto Top

Mod rewrite funktioniert unter Plesk Obsidian nicht korrekt

Hallo,

ich habe ein frisch aufgesetzten Server mit Debian 9 und Plesk (Version 18.0.27 Update #1) bei IONOS.
In Plesk habe ich eine Domain bzw. einen Webspace eingerichtet. Ansonsten habe ich keine weiteren Einstellungen vorgenommen. Nginx dient als reverse Proxy und verweist auf den Apache.
Grundsätzlich funktioniert das auch alles. Lediglich Rewrite bringt mich zum Verzweifeln.
Es verhält sich total merkwürdig. Umleitungen zu komplett anderen Domains funktionieren. Der Verweis auf ein Script aber nicht.

Ich möchte, dass URLs wie folgt umgeschrieben werden: domain.de/etwas > domain.de/index.php/etwas

Die nachfolgend beschriebene Konfiguration nutze ich bereits erfolgreich auf einem anderen Webserver.

.htaccess:
RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]


Wenn ich die Domain "domain.de/etwas" aufrufe, wird im Browser die Fehlermeldung "File not found." zusammen mit dem HTTP Status 404 angezeigt. Das ist etwas komisch, da nicht die reguläre 404 Seite ausgegeben wird.

In der error_log steht dazu:
[Sat Jun 06 22:39:44.985055 2020] [proxy_fcgi:error] [pid 64022:tid 139995009009408] [client 11.22.33.44:50444] AH01071: Got error 'Primary script unknown'


Da das nicht so wirklich aussagekräftig ist, habe ich "LogLevel alert rewrite:trace8" als zusätzliche directive konfiguriert.

Hier ein Auszug aus der error_log:

[Sat Jun 06 22:57:10.046358 2020] [rewrite:trace2] [pid 6997:tid 139748605638400] mod_rewrite.c(477): [client 11.22.33.44:59630] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b970a0/initial] init rewrite engine with requested uri /etwas
[Sat Jun 06 22:57:10.047670 2020] [rewrite:trace3] [pid 6997:tid 139748605638400] mod_rewrite.c(477): [client 11.22.33.44:59630] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b970a0/initial] applying pattern '^(.*)$' to uri '/etwas' 
[Sat Jun 06 22:57:10.047707 2020] [rewrite:trace4] [pid 6997:tid 139748605638400] mod_rewrite.c(477): [client 11.22.33.44:59630] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b970a0/initial] RewriteCond: input='/etwas' pattern='^/autodiscover/autodiscover\\.xml$' [NC] => not-matched 
[Sat Jun 06 22:57:10.047719 2020] [rewrite:trace4] [pid 6997:tid 139748605638400] mod_rewrite.c(477): [client 11.22.33.44:59630] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b970a0/initial] RewriteCond: input='/etwas' pattern='^(/\\.well-known/autoconfig)?/mail/config\\-v1\\.1\\.xml$' [NC] => not-matched 
[Sat Jun 06 22:57:10.047728 2020] [rewrite:trace4] [pid 6997:tid 139748605638400] mod_rewrite.c(477): [client 11.22.33.44:59630] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b970a0/initial] RewriteCond: input='/etwas' pattern='^/email\\.mobileconfig$' [NC] => not-matched 
[Sat Jun 06 22:57:10.047735 2020] [rewrite:trace1] [pid 6997:tid 139748605638400] mod_rewrite.c(477): [client 11.22.33.44:59630] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b970a0/initial] pass through /etwas
[Sat Jun 06 22:57:10.049270 2020] [rewrite:trace2] [pid 6997:tid 139748605638400] mod_rewrite.c(477): [client 11.22.33.44:59630] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b94b00/initial/redir#1] init rewrite engine with requested uri /error_docs/not_found.html
[Sat Jun 06 22:57:10.049294 2020] [rewrite:trace3] [pid 6997:tid 139748605638400] mod_rewrite.c(477): [client 11.22.33.44:59630] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b94b00/initial/redir#1] applying pattern '^(.*)$' to uri '/error_docs/not_found.html' 
[Sat Jun 06 22:57:10.049307 2020] [rewrite:trace4] [pid 6997:tid 139748605638400] mod_rewrite.c(477): [client 11.22.33.44:59630] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b94b00/initial/redir#1] RewriteCond: input='/error_docs/not_found.html' pattern='^/autodiscover/autodiscover\\.xml$' [NC] => not-matched 
[Sat Jun 06 22:57:10.049317 2020] [rewrite:trace4] [pid 6997:tid 139748605638400] mod_rewrite.c(477): [client 11.22.33.44:59630] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b94b00/initial/redir#1] RewriteCond: input='/error_docs/not_found.html' pattern='^(/\\.well-known/autoconfig)?/mail/config\\-v1\\.1\\.xml$' [NC] => not-matched 
[Sat Jun 06 22:57:10.049325 2020] [rewrite:trace4] [pid 6997:tid 139748605638400] mod_rewrite.c(477): [client 11.22.33.44:59630] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b94b00/initial/redir#1] RewriteCond: input='/error_docs/not_found.html' pattern='^/email\\.mobileconfig$' [NC] => not-matched 
[Sat Jun 06 22:57:10.049332 2020] [rewrite:trace1] [pid 6997:tid 139748605638400] mod_rewrite.c(477): [client 11.22.33.44:59630] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b94b00/initial/redir#1] pass through /error_docs/not_found.html
[Sat Jun 06 22:57:10.202177 2020] [rewrite:trace2] [pid 6997:tid 139748689565440] mod_rewrite.c(477): [client 11.22.33.44:59632] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b930a0/initial] init rewrite engine with requested uri /error_docs/styles.css, referer: https:{{comment_single_line_double_slash:0}}
[Sat Jun 06 22:57:10.202227 2020] [rewrite:trace3] [pid 6997:tid 139748689565440] mod_rewrite.c(477): [client 11.22.33.44:59632] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b930a0/initial] applying pattern '^(.*)$' to uri '/error_docs/styles.css', referer: https:{{comment_single_line_double_slash:0}} 
[Sat Jun 06 22:57:10.202243 2020] [rewrite:trace4] [pid 6997:tid 139748689565440] mod_rewrite.c(477): [client 11.22.33.44:59632] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b930a0/initial] RewriteCond: input='/error_docs/styles.css' pattern='^/autodiscover/autodiscover\\.xml$' [NC] => not-matched, referer: https:{{comment_single_line_double_slash:0}} 
[Sat Jun 06 22:57:10.202264 2020] [rewrite:trace4] [pid 6997:tid 139748689565440] mod_rewrite.c(477): [client 11.22.33.44:59632] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b930a0/initial] RewriteCond: input='/error_docs/styles.css' pattern='^(/\\.well-known/autoconfig)?/mail/config\\-v1\\.1\\.xml$' [NC] => not-matched, referer: https:{{comment_single_line_double_slash:0}} 
[Sat Jun 06 22:57:10.202272 2020] [rewrite:trace4] [pid 6997:tid 139748689565440] mod_rewrite.c(477): [client 11.22.33.44:59632] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b930a0/initial] RewriteCond: input='/error_docs/styles.css' pattern='^/email\\.mobileconfig$' [NC] => not-matched, referer: https:{{comment_single_line_double_slash:0}} 
[Sat Jun 06 22:57:10.202280 2020] [rewrite:trace1] [pid 6997:tid 139748689565440] mod_rewrite.c(477): [client 11.22.33.44:59632] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b930a0/initial] pass through /error_docs/styles.css, referer: https:{{comment_single_line_double_slash:0}}
[Sat Jun 06 22:57:10.316461 2020] [rewrite:trace2] [pid 6997:tid 139748814632704] mod_rewrite.c(477): [client 11.22.33.44:59634] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b910a0/initial] init rewrite engine with requested uri /error_docs/server.svg, referer: https:{{comment_single_line_double_slash:6}}
[Sat Jun 06 22:57:10.316502 2020] [rewrite:trace3] [pid 6997:tid 139748814632704] mod_rewrite.c(477): [client 11.22.33.44:59634] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b910a0/initial] applying pattern '^(.*)$' to uri '/error_docs/server.svg', referer: https:{{comment_single_line_double_slash:6}} 
[Sat Jun 06 22:57:10.316516 2020] [rewrite:trace4] [pid 6997:tid 139748814632704] mod_rewrite.c(477): [client 11.22.33.44:59634] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b910a0/initial] RewriteCond: input='/error_docs/server.svg' pattern='^/autodiscover/autodiscover\\.xml$' [NC] => not-matched, referer: https:{{comment_single_line_double_slash:6}} 
[Sat Jun 06 22:57:10.316525 2020] [rewrite:trace4] [pid 6997:tid 139748814632704] mod_rewrite.c(477): [client 11.22.33.44:59634] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b910a0/initial] RewriteCond: input='/error_docs/server.svg' pattern='^(/\\.well-known/autoconfig)?/mail/config\\-v1\\.1\\.xml$' [NC] => not-matched, referer: https:{{comment_single_line_double_slash:6}} 
[Sat Jun 06 22:57:10.316533 2020] [rewrite:trace4] [pid 6997:tid 139748814632704] mod_rewrite.c(477): [client 11.22.33.44:59634] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b910a0/initial] RewriteCond: input='/error_docs/server.svg' pattern='^/email\\.mobileconfig$' [NC] => not-matched, referer: https:{{comment_single_line_double_slash:6}} 
[Sat Jun 06 22:57:10.316541 2020] [rewrite:trace1] [pid 6997:tid 139748814632704] mod_rewrite.c(477): [client 11.22.33.44:59634] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b910a0/initial] pass through /error_docs/server.svg, referer: https:{{comment_single_line_double_slash:6}}
[Sat Jun 06 22:57:28.389118 2020] [rewrite:trace2] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] init rewrite engine with requested uri /etwas
[Sat Jun 06 22:57:28.389162 2020] [rewrite:trace3] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] applying pattern '^(.*)$' to uri '/etwas' 
[Sat Jun 06 22:57:28.389199 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] RewriteCond: input='/etwas' pattern='^/autodiscover/autodiscover\\.xml$' [NC] => not-matched 
[Sat Jun 06 22:57:28.389206 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] RewriteCond: input='/etwas' pattern='^(/\\.well-known/autoconfig)?/mail/config\\-v1\\.1\\.xml$' [NC] => not-matched 
[Sat Jun 06 22:57:28.389219 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] RewriteCond: input='/etwas' pattern='^/email\\.mobileconfig$' [NC] => not-matched 
[Sat Jun 06 22:57:28.389225 2020] [rewrite:trace1] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] pass through /etwas
[Sat Jun 06 22:57:28.389355 2020] [rewrite:trace3] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] [perdir /var/www/vhosts/domain.de/httpdocs/] strip per-dir prefix: /var/www/vhosts/domain.de/httpdocs/etwas -> etwas
[Sat Jun 06 22:57:28.389362 2020] [rewrite:trace3] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] [perdir /var/www/vhosts/domain.de/httpdocs/] applying pattern '^(.*)$' to uri 'etwas' 
[Sat Jun 06 22:57:28.389370 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] [perdir /var/www/vhosts/domain.de/httpdocs/] RewriteCond: input='/var/www/vhosts/domain.de/httpdocs/etwas' pattern='!-f' => matched 
[Sat Jun 06 22:57:28.389376 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] [perdir /var/www/vhosts/domain.de/httpdocs/] RewriteCond: input='/var/www/vhosts/domain.de/httpdocs/etwas' pattern='!-d' => matched 
[Sat Jun 06 22:57:28.389381 2020] [rewrite:trace2] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] [perdir /var/www/vhosts/domain.de/httpdocs/] rewrite 'etwas' -> 'index.php/etwas' 
[Sat Jun 06 22:57:28.389387 2020] [rewrite:trace3] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] [perdir /var/www/vhosts/domain.de/httpdocs/] add per-dir prefix: index.php/etwas -> /var/www/vhosts/domain.de/httpdocs/index.php/etwas
[Sat Jun 06 22:57:28.389393 2020] [rewrite:trace2] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] [perdir /var/www/vhosts/domain.de/httpdocs/] trying to replace prefix /var/www/vhosts/domain.de/httpdocs/ with /
[Sat Jun 06 22:57:28.389398 2020] [rewrite:trace5] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] strip matching prefix: /var/www/vhosts/domain.de/httpdocs/index.php/etwas -> index.php/etwas
[Sat Jun 06 22:57:28.389403 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] add subst prefix: index.php/etwas -> /index.php/etwas
[Sat Jun 06 22:57:28.389407 2020] [rewrite:trace1] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b950a0/initial] [perdir /var/www/vhosts/domain.de/httpdocs/] internal redirect with /index.php/etwas [INTERNAL REDIRECT]
[Sat Jun 06 22:57:28.389447 2020] [rewrite:trace2] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b935e0/initial/redir#1] init rewrite engine with requested uri /index.php/etwas
[Sat Jun 06 22:57:28.389453 2020] [rewrite:trace3] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b935e0/initial/redir#1] applying pattern '^(.*)$' to uri '/index.php/etwas' 
[Sat Jun 06 22:57:28.389463 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b935e0/initial/redir#1] RewriteCond: input='/index.php/etwas' pattern='^/autodiscover/autodiscover\\.xml$' [NC] => not-matched 
[Sat Jun 06 22:57:28.389468 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b935e0/initial/redir#1] RewriteCond: input='/index.php/etwas' pattern='^(/\\.well-known/autoconfig)?/mail/config\\-v1\\.1\\.xml$' [NC] => not-matched 
[Sat Jun 06 22:57:28.389473 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b935e0/initial/redir#1] RewriteCond: input='/index.php/etwas' pattern='^/email\\.mobileconfig$' [NC] => not-matched 
[Sat Jun 06 22:57:28.389478 2020] [rewrite:trace1] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b935e0/initial/redir#1] pass through /index.php/etwas
[Sat Jun 06 22:57:28.391910 2020] [rewrite:trace3] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b935e0/initial/redir#1] [perdir /var/www/vhosts/domain.de/httpdocs/] add path info postfix: /var/www/vhosts/domain.de/httpdocs/index.php -> /var/www/vhosts/domain.de/httpdocs/index.php/etwas
[Sat Jun 06 22:57:28.391935 2020] [rewrite:trace3] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b935e0/initial/redir#1] [perdir /var/www/vhosts/domain.de/httpdocs/] strip per-dir prefix: /var/www/vhosts/domain.de/httpdocs/index.php/etwas -> index.php/etwas
[Sat Jun 06 22:57:28.391941 2020] [rewrite:trace3] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b935e0/initial/redir#1] [perdir /var/www/vhosts/domain.de/httpdocs/] applying pattern '^(.*)$' to uri 'index.php/etwas' 
[Sat Jun 06 22:57:28.391951 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b935e0/initial/redir#1] [perdir /var/www/vhosts/domain.de/httpdocs/] RewriteCond: input='/var/www/vhosts/domain.de/httpdocs/index.php' pattern='!-f' => not-matched 
[Sat Jun 06 22:57:28.391956 2020] [rewrite:trace1] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b935e0/initial/redir#1] [perdir /var/www/vhosts/domain.de/httpdocs/] pass through /var/www/vhosts/domain.de/httpdocs/index.php
[Sat Jun 06 22:57:28.393524 2020] [rewrite:trace2] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] init rewrite engine with requested uri /etwas
[Sat Jun 06 22:57:28.393540 2020] [rewrite:trace3] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] applying pattern '^(.*)$' to uri '/etwas' 
[Sat Jun 06 22:57:28.393553 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] RewriteCond: input='/etwas' pattern='^/autodiscover/autodiscover\\.xml$' [NC] => not-matched 
[Sat Jun 06 22:57:28.393559 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] RewriteCond: input='/etwas' pattern='^(/\\.well-known/autoconfig)?/mail/config\\-v1\\.1\\.xml$' [NC] => not-matched 
[Sat Jun 06 22:57:28.393569 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] RewriteCond: input='/etwas' pattern='^/email\\.mobileconfig$' [NC] => not-matched 
[Sat Jun 06 22:57:28.393574 2020] [rewrite:trace1] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] pass through /etwas
[Sat Jun 06 22:57:28.393614 2020] [rewrite:trace3] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] [perdir /var/www/vhosts/domain.de/httpdocs/] strip per-dir prefix: /var/www/vhosts/domain.de/httpdocs/etwas -> etwas
[Sat Jun 06 22:57:28.393620 2020] [rewrite:trace3] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] [perdir /var/www/vhosts/domain.de/httpdocs/] applying pattern '^(.*)$' to uri 'etwas' 
[Sat Jun 06 22:57:28.393627 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] [perdir /var/www/vhosts/domain.de/httpdocs/] RewriteCond: input='/var/www/vhosts/domain.de/httpdocs/etwas' pattern='!-f' => matched 
[Sat Jun 06 22:57:28.393633 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] [perdir /var/www/vhosts/domain.de/httpdocs/] RewriteCond: input='/var/www/vhosts/domain.de/httpdocs/etwas' pattern='!-d' => matched 
[Sat Jun 06 22:57:28.393638 2020] [rewrite:trace2] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] [perdir /var/www/vhosts/domain.de/httpdocs/] rewrite 'etwas' -> 'index.php/etwas' 
[Sat Jun 06 22:57:28.393643 2020] [rewrite:trace3] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] [perdir /var/www/vhosts/domain.de/httpdocs/] add per-dir prefix: index.php/etwas -> /var/www/vhosts/domain.de/httpdocs/index.php/etwas
[Sat Jun 06 22:57:28.393649 2020] [rewrite:trace2] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] [perdir /var/www/vhosts/domain.de/httpdocs/] trying to replace prefix /var/www/vhosts/domain.de/httpdocs/ with /
[Sat Jun 06 22:57:28.393654 2020] [rewrite:trace5] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] strip matching prefix: /var/www/vhosts/domain.de/httpdocs/index.php/etwas -> index.php/etwas
[Sat Jun 06 22:57:28.393660 2020] [rewrite:trace4] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] add subst prefix: index.php/etwas -> /index.php/etwas
[Sat Jun 06 22:57:28.393665 2020] [rewrite:trace1] [pid 6997:tid 139748672780032] mod_rewrite.c(477): [client 11.22.33.44:59636] 11.22.33.44 - - [domain.de/sid#7f19d6c5d930][rid#7f19d6b870a0/subreq] [perdir /var/www/vhosts/domain.de/httpdocs/] internal redirect with /index.php/etwas [INTERNAL REDIRECT]



Ich bin der Meinung, dass das Rewrite eigentlich funktioniert. In der letzten Zeile der Logdatei wird der Pfad korrekt zusammengesetzt. Wenn man diesen manuell im Browser eingibt ("domain.de/index.php/etwas"), funktioniert der auch.


Testweise habe ich noch einmal folgende directive ergänzt:
<Directory "/var/www/vhosts/domain.de/httpdocs">  
	AllowOverride All
</Directory>
Leider hat das nicht zum gewünschten Erfolg geführt.

Hier die von Plesk erstellte httpd.conf:

#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
#IF YOU REQUIRE TO APPLY CUSTOM MODIFICATIONS, PERFORM THEM IN THE FOLLOWING FILES:
#/var/www/vhosts/system/domain.de/conf/vhost.conf
#/var/www/vhosts/system/domain.de/conf/vhost_ssl.conf
<IfModule mod_ssl.c>

	<VirtualHost 128.128.128.128:7081 >
		ServerName "domain.de"  
		ServerAlias "www.domain.de"  
		ServerAlias "ipv4.domain.de"  
		UseCanonicalName Off

		# mailconfig
		<IfModule mod_proxy_http.c>
			<IfModule mod_rewrite.c>
				RewriteEngine On
				RewriteCond %{REQUEST_URI} ^/autodiscover/autodiscover\.xml$ [NC,OR]
				RewriteCond %{REQUEST_URI} ^(/\.well-known/autoconfig)?/mail/config\-v1\.1\.xml$ [NC,OR]
				RewriteCond %{REQUEST_URI} ^/email\.mobileconfig$ [NC]
				RewriteRule ^(.*)$ http://127.0.0.1:8880/mailconfig/ [P,QSA,L,E=REQUEST_URI:%{REQUEST_URI},E=HOST:%{HTTP_HOST}]
			</IfModule>
			<Proxy "http://127.0.0.1:8880/mailconfig/">  
				RequestHeader set X-Host "%{HOST}e"  
				RequestHeader set X-Request-URI "%{REQUEST_URI}e"  
			</Proxy>
		</IfModule>
		# mailconfig

		DocumentRoot "/var/www/vhosts/domain.de/httpdocs"  
		CustomLog /var/www/vhosts/system/domain.de/logs/access_ssl_log plesklog
		ErrorLog "/var/www/vhosts/system/domain.de/logs/error_log"  

		<IfModule mod_suexec.c>
			SuexecUserGroup "domain" "psacln"  
		</IfModule>

		<IfModule mod_userdir.c>
			UserDir "/var/www/vhosts/domain.de/web_users/*"  
		</IfModule>

		<IfModule mod_sysenv.c>
			SetSysEnv PP_VHOST_ID "d7b71416-d2bf-47d4-a622-85a8213c39c5"  
		</IfModule>

		Alias "/plesk-stat" "/var/www/vhosts/system/domain.de/statistics"  
		<Location  /plesk-stat/>
			Options +Indexes
		</Location>
		<Location  /plesk-stat/logs/>
			Require valid-user
		</Location>
		Alias /webstat /var/www/vhosts/system/domain.de/statistics/webstat
		Alias /webstat-ssl /var/www/vhosts/system/domain.de/statistics/webstat-ssl
		Alias /ftpstat /var/www/vhosts/system/domain.de/statistics/ftpstat
		Alias /anon_ftpstat /var/www/vhosts/system/domain.de/statistics/anon_ftpstat
		Alias /awstats-icon /usr/share/awstats/icon

		SSLEngine on
		SSLVerifyClient none
		SSLCertificateFile /opt/psa/var/certificates/scfBkkJYi
		SSLCACertificateFile /opt/psa/var/certificates/scfkfIy2N

		<Directory /var/www/vhosts/domain.de/httpdocs>

			<IfModule mod_fcgid.c>
				<Files ~ (\.fcgi$)>
					SetHandler fcgid-script
					Options +ExecCGI
				</Files>
			</IfModule>
			<IfModule mod_proxy_fcgi.c>
				<Files ~ (\.php$)>
					SetHandler proxy:unix:///var/www/vhosts/system/domain.de/php-fpm.sock|fcgi://127.0.0.1:9000
				</Files>
			</IfModule>

			SSLRequireSSL

			Options -Includes -ExecCGI

		</Directory>

		<Directory "/var/www/vhosts/system/domain.de/statistics">  
			AuthType Basic
			AuthName "Domain statistics"  
			AuthUserFile "/var/www/vhosts/system/domain.de/pd/d..httpdocs@plesk-stat"  
			require valid-user
		</Directory>

		Alias /error_docs /var/www/vhosts/domain.de/error_docs
		ErrorDocument 400 /error_docs/bad_request.html
		ErrorDocument 401 /error_docs/unauthorized.html
		ErrorDocument 403 /error_docs/forbidden.html
		ErrorDocument 404 /error_docs/not_found.html
		ErrorDocument 500 /error_docs/internal_server_error.html
		ErrorDocument 405 /error_docs/method_not_allowed.html
		ErrorDocument 406 /error_docs/not_acceptable.html
		ErrorDocument 407 /error_docs/proxy_authentication_required.html
		ErrorDocument 412 /error_docs/precondition_failed.html
		ErrorDocument 414 /error_docs/request_uri_too_long.html
		ErrorDocument 415 /error_docs/unsupported_media_type.html
		ErrorDocument 501 /error_docs/not_implemented.html
		ErrorDocument 502 /error_docs/bad_gateway.html
		ErrorDocument 503 /error_docs/maintenance.html

		IncludeOptional "/opt/psa/admin/conf/file_sharing.conf*"  

		DirectoryIndex "index.html" "index.cgi" "index.pl" "index.php" "index.xhtml" "index.htm" "index.shtml"  

		Include "/var/www/vhosts/system/domain.de/conf/vhost_ssl.conf"  

		<Directory /var/www/vhosts/domain.de>
			AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,SymLinksIfOwnerMatch,MultiViews,FollowSymLinks,ExecCGI,Includes,IncludesNOEXEC
		</Directory>

		#extension letsencrypt begin
		Alias /.well-known/acme-challenge "/var/www/vhosts/default/htdocs/.well-known/acme-challenge"  

		<Location /.well-known/acme-challenge/>
			# Require all granted
			Order Deny,Allow
			Allow from all
			Satisfy any
		</Location>

		<LocationMatch "^/.well-known/acme-challenge/(.*/|)\.">  
			# Require all denied
			Order Allow,Deny
			Deny from all
		</LocationMatch>
		#extension letsencrypt end

		#extension sslit begin

		#extension sslit end
	</VirtualHost>

</IfModule>

<VirtualHost 128.128.128.128:7080 >
	ServerName "domain.de"  
	ServerAlias "www.domain.de"  
	ServerAlias "ipv4.domain.de"  
	UseCanonicalName Off

	# mailconfig
	<IfModule mod_proxy_http.c>
		<IfModule mod_rewrite.c>
			RewriteEngine On
			RewriteCond %{REQUEST_URI} ^/autodiscover/autodiscover\.xml$ [NC,OR]
			RewriteCond %{REQUEST_URI} ^(/\.well-known/autoconfig)?/mail/config\-v1\.1\.xml$ [NC,OR]
			RewriteCond %{REQUEST_URI} ^/email\.mobileconfig$ [NC]
			RewriteRule ^(.*)$ http://127.0.0.1:8880/mailconfig/ [P,QSA,L,E=REQUEST_URI:%{REQUEST_URI},E=HOST:%{HTTP_HOST}]
		</IfModule>
		<Proxy "http://127.0.0.1:8880/mailconfig/">  
			RequestHeader set X-Host "%{HOST}e"  
			RequestHeader set X-Request-URI "%{REQUEST_URI}e"  
		</Proxy>
	</IfModule>
	# mailconfig

	Include "/var/www/vhosts/system/domain.de/conf/vhost.conf"  

	<IfModule mod_rewrite.c>
		RewriteEngine On
		RewriteCond %{HTTPS} off
		RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,QSA]
	</IfModule>
</VirtualHost>


Hat jemand eine Idee, in welche Richtung ich noch einmal weiter forschen könnte oder hat jemand dieses Problem schon einmal gehabt und eine Lösung dafür?


Besten Dank schon einmal face-smile

Content-ID: 577346

Url: https://administrator.de/forum/mod-rewrite-funktioniert-unter-plesk-obsidian-nicht-korrekt-577346.html

Ausgedruckt am: 22.12.2024 um 08:12 Uhr

Fringel
Fringel 22.07.2020 um 13:00:51 Uhr
Goto Top
Hallo Androxin, nach langer Recherche habe ich deinen Eintrag gefunden, da ich genau das gleiche Problem habe. Hast du schon eine Lösung gefunden?

Gruß Fringel
Androxin
Androxin 24.07.2020 um 14:02:22 Uhr
Goto Top
Hallo,

nein, ich habe keine Lösung gefunden.
Allerdings habe ich in der Zwischenzeit diverse Plesk Versionen auf nackten Debian 9 Images von IONOS ausprobiert.
Es hat bei keiner funktioniert. Auch nicht bei älteren.
Fringel
Fringel 24.07.2020 um 15:01:19 Uhr
Goto Top
Hallo,

ich habe gestern eine Lösung gefunden! Man muss in den Hosting Einstellungen run PHP as "FPM application served by Apache" auswählen und dann läuft mod_rewrite wie es soll.

Gruß Fringel