My server (Debian 11 / php fpm / apache 2.4) is downloading only html files intead of serving them! Php files are served correctly. I've checked apache.conf and the mime type is correctly given :
AddType application/x-httpd-php .php
AddType application/x-httpd-phps .phps
AddType application/x-httpd-php7 .php7 .phtml
AddType application/x-httpd-php .html .htm
I've checked the file with the inline command : wge --server-response -O and header
seems to be ok:
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Date: Sat, 03 Sep 2022 17:22:52 GMT
Server: Apache/2.4.38
Last-Modified: Wed, 20 Jul 2022 16:31:05 GMT
Accept-Ranges: bytes
Content-Length: 2506
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/x-httpd-php
Length: 2506 (2.4K) [application/x-httpd-php]
Saving to: ‘/dev/null’
I'm searching for hours but can't find anything :-(
source https://stackoverflow.com/questions/73594936/apache-downloading-html-files-instead-of-serving-them-php-file-working
No comments:
Post a Comment