Всем привет! Помогите, пожалуйста, продиагностировать, почему вместо результата кода я вижу текст(содержимое файла)?
имею файл на сервере /var/www/html/index.php
<?php
phpinfo();
?>
конфиг единственного сайта:
<VirtualHost *:80>
DocumentRoot /var/www/html
DirectoryIndex index.php index.html
ErrorLog ${APACHE_LOG_DIR}/test1/error.log
CustomLog ${APACHE_LOG_DIR}/test1/access.log combined
</VirtualHost>
При старте апача вижу в /var/log/apache2/error.log:
[Sat Dec 03 13:38:22.886902 2016] [suexec:notice] [pid 27785] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sat Dec 03 13:38:22.922862 2016] [mpm_prefork:notice] [pid 27786] AH00163: Apache/2.4.10 (Debian) mod_fcgid/2.3.9 OpenSSL/1.0.1t configured -- resuming normal operations
[Sat Dec 03 13:38:22.922895 2016] [core:notice] [pid 27786] AH00094: Command line: '/usr/sbin/apache2'
/var/log/apache2/test1/error.log пуст.
Из командной строки файл index.php выполняется нормально.
Установленные пакеты:
dpkg -l | grep php
ii ispmanager-pkg-php 5.83.3-1-deb8 all ISPmanager-pkg-php
ii libapache2-mod-php5 5.6.27+dfsg-0+deb8u1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii php-gettext 1.0.11-1 all read gettext MO files directly, without requiring anything other than PHP
ii php-tcpdf 6.0.093+dfsg-1 all PHP class for generating PDF files on-the-fly
ii php5-cgi 5.6.27+dfsg-0+deb8u1 amd64 server-side, HTML-embedded scripting language (CGI binary)
ii php5-cli 5.6.27+dfsg-0+deb8u1 amd64 command-line interpreter for the php5 scripting language
ii php5-common 5.6.27+dfsg-0+deb8u1 amd64 Common files for packages built from the php5 source
ii php5-curl 5.6.27+dfsg-0+deb8u1 amd64 CURL module for php5
ii php5-gd 5.6.27+dfsg-0+deb8u1 amd64 GD module for php5
ii php5-json 1.3.6-1 amd64 JSON module for php5
ii php5-mcrypt 5.6.27+dfsg-0+deb8u1 amd64 MCrypt module for php5
ii php5-mysql 5.6.27+dfsg-0+deb8u1 amd64 MySQL module for php5
ii php5-readline 5.6.27+dfsg-0+deb8u1 amd64 Readline module for php5
ii phpmyadmin 4:4.2.12-2+deb8u2 all MySQL web administration tool
Конфиг папача:
Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
LogFormat "%v:%p %a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%a %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
Include conf.d/
Include vhosts-default/
Include vhosts/
Listen 80