Answer the question
In order to leave comments, you need to log in
Why are php files not processed in apache2?
Hello. The question is in the topic title. PHP version 7.0. Google used, but none of the solutions helped.
The web server is running, i.e. when going to localhost/index.html shows the Apache welcome page. But here I made a test.php file with the content echo "test" - an empty page. If you examine the element in the browser inspector, then the php code is commented out and there are empty head, body tags (which are not in the file). The source code of the page shows how the file is.
UPD:
- installed extensions: php-fpm, libapache2-mod-php7
- added in apache2.conf file
LoadModule php7_module modules/libphp7.so
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
Answer the question
In order to leave comments, you need to log in
I found the solution here
In a nutshell, the matter is in the authorization of Astra Linux. There are two solutions:
1. Set up authorization according to all the laws of AstraLinux
2. Disable "AstraMode off" authorization in /etc/apache2/apache2.conf,
I chose the second one and php scripts started to be executed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question