Hello,
I have a freshly set up server with Debian 9 and Plesk (version 18.0.27 Update #1) by IONOS.
In Plesk I have set up a domain/webspace. There are no other settings I have made. Nginx serves as reverse proxy.
Basically everything works as well. Only Rewrite makes me feel tired.
It behaves totally strange. Redirections to other domains work. But the reference to a script does not.
I want URLs to be rewritten as follows: domain.de/etwas > domain.de/index.php/etwas
I am already using the configuration described below successfully on another web server.
.htaccess:
When I open the domain "domain.de/etwas", the browser displays the error message "File not found." along with the HTTP status 404. This is a bit strange, because the regular 404 page is not shown.
In the error_log it is written:
[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'.
As this is not really informative, I have configured "LogLevel alert rewrite:trace8" as an additional directive.
Here is an extract of the error_log:
I think that the rewrite actually works. In the last line of the log file the path is correctly composed. If you enter it manually in your browser ("domain.de/index.php/etwas"), it will also work.
Here the httpd.conf created by Plesk:
As a test, I have deactivated the reverse proxy service. But this did not affect the error.
Does anybody have an idea in which direction I could do further research or has anybody already had this problem and a solution for it?
I have a freshly set up server with Debian 9 and Plesk (version 18.0.27 Update #1) by IONOS.
In Plesk I have set up a domain/webspace. There are no other settings I have made. Nginx serves as reverse proxy.
Basically everything works as well. Only Rewrite makes me feel tired.
It behaves totally strange. Redirections to other domains work. But the reference to a script does not.
I want URLs to be rewritten as follows: domain.de/etwas > domain.de/index.php/etwas
I am already using the configuration described below successfully on another web server.
.htaccess:
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
When I open the domain "domain.de/etwas", the browser displays the error message "File not found." along with the HTTP status 404. This is a bit strange, because the regular 404 page is not shown.
In the error_log it is written:
[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'.
As this is not really informative, I have configured "LogLevel alert rewrite:trace8" as an additional directive.
Here is an extract of the error_log:
error_log - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
pastebin.com
Code:
[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]
I think that the rewrite actually works. In the last line of the log file the path is correctly composed. If you enter it manually in your browser ("domain.de/index.php/etwas"), it will also work.
Here the httpd.conf created by Plesk:
httpd - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
pastebin.com
As a test, I have deactivated the reverse proxy service. But this did not affect the error.
Does anybody have an idea in which direction I could do further research or has anybody already had this problem and a solution for it?