Ich nutze ein älteres PHP Script bei dem die PHP Seiten durch eine .htaccess in .html Seiten umgeschrieben werden.
Seit ich meinen neuen Server habe funktioniert dies leider nicht mehr.
Klicke ich eine Link auf der Seite an werden die Seiten als .html heruntergeladen anstatt angezeigt.
Mein Server läuft mit CentOS8, DirectAdmin und PHP-FPM(fpm-fcgi).
Hat vielleicht jemand eine Idee an was es liegen könnte.
Danke im voraus
PHP-FPM und .htaccess URL rewrite
-
- Project Manager
- Posts: 11179
- Joined: 2003-02-27 01:00
- Location: Hamburg
Re: PHP-FPM und .htaccess URL rewrite
Wie sehen die entsprechenden Konfigurationen aus?
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
-
- Posts: 2
- Joined: 2020-11-03 00:08
Re: PHP-FPM und .htaccess URL rewrite
Der Server läuft mir
CentoOS8
DirectAdmin 1.61.5
Apache 2.4.46
MariaDB 10.4.14
php2 7.1.33
Die htaccess sieht so aus
AcceptPathInfo On
<Files topic>
ForceType application/x-httpd-php
</Files>
<Files forum>
ForceType application/x-httpd-php
</Files>
CentoOS8
DirectAdmin 1.61.5
Apache 2.4.46
MariaDB 10.4.14
php2 7.1.33
Die htaccess sieht so aus
AcceptPathInfo On
<Files topic>
ForceType application/x-httpd-php
</Files>
<Files forum>
ForceType application/x-httpd-php
</Files>
-
- Project Manager
- Posts: 11179
- Joined: 2003-02-27 01:00
- Location: Hamburg
Re: PHP-FPM und .htaccess URL rewrite
Auf die Gefahr hin mich zu wiederholen:
Wie sehen die entsprechenden Konfigurationen aus?
Wie sehen die entsprechenden Konfigurationen aus?
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
-
- Posts: 297
- Joined: 2002-10-15 16:59
- Location: WHV
Re: PHP-FPM und .htaccess URL rewrite
Ob Mono zurückkommt ?
sich beißt. Mit dem dem Händler ist PHP als Modul gemeint und nicht eine FPM Instanz
Wäre hier richtiger (natürlich Pfade anpassen auf die richtige FPM Instanz)
Glücklich wäre ich aber eher mit einer mod_rewrite Lösung.
Dieser single File umbiege Kram ist so 90er irgendwie.
Auch ohne restliche config sehe ich hier das PHP-FPM und "application/x-httpd-php"
sich beißt. Mit dem dem Händler ist PHP als Modul gemeint und nicht eine FPM Instanz
Code: Select all
<Files topic>
SetHandler "proxy:unix:/run/php/php7-fpm-XXXxxx.sock|fcgi://localhost"
</Files>
Glücklich wäre ich aber eher mit einer mod_rewrite Lösung.
Dieser single File umbiege Kram ist so 90er irgendwie.
-
- Project Manager
- Posts: 11179
- Joined: 2003-02-27 01:00
- Location: Hamburg
Re: PHP-FPM und .htaccess URL rewrite
Eigentlich macht man es so "richtig":
Code: Select all
...
LoadModule proxy_module libexec/apache24/mod_proxy.so
LoadModule proxy_fcgi_module libexec/apache24/mod_proxy_fcgi.so
...
...
<VirtualHost *:443>
...
<FilesMatch "(.+\.phps?)(/.*)?$">
ProxyFCGIBackendType GENERIC
SetHandler "proxy:unix:/var/run/fpm_www.sock|fcgi://localhost"
</FilesMatch>
<Proxy "fcgi://localhost" enablereuse=on max=10>
</Proxy>
...
</VirtualHost>
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.