Apache将php页面作为文本加载
我的Apache2服务器有问题。 Im使用VDS和Debian操作系统。 服务器将所有文件显示为纯文本 例如: Apache配置:Apache将php页面作为文本加载,php,apache,debian,Php,Apache,Debian,我的Apache2服务器有问题。 Im使用VDS和Debian操作系统。 服务器将所有文件显示为纯文本 例如: Apache配置: <VirtualHost 213.159.209.165:80> ServerName pixellot.ru AddDefaultCharset off AssignUserID romancasper romancasper DirectoryIndex index.html index.php Documen
<VirtualHost 213.159.209.165:80>
ServerName pixellot.ru
AddDefaultCharset off
AssignUserID romancasper romancasper
DirectoryIndex index.html index.php
DocumentRoot /var/www/romancasper/data/www/pixellot.ru
ServerAdmin webmaster@pixellot.ru
ServerAlias www.pixellot.ru
CustomLog /var/www/httpd-logs/pixellot.ru.access.log combined
ErrorLog /var/www/httpd-logs/pixellot.ru.error.log
<FilesMatch "\.ph(p[3-5]?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f webmaster@pixellot.ru"
php_admin_value upload_tmp_dir "/var/www/romancasper/data/mod-tmp"
php_admin_value session.save_path "/var/www/romancasper/data/mod-tmp"
php_admin_value open_basedir "/var/www/romancasper/data:."
</VirtualHost>
<Directory />
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<Directory /var/www/romancasper/data/www/pixellot.ru>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
我需要做什么
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
替换为:
<FilesMatch "\.php$">
SetHandler application/x-httpd-php-source
</FilesMatch>
或者将应用程序类型更改为:application/octet stream或text/html确保安装了php。@Criesto apt get install php5 php pear php5 mysql。结果>php5已经是最新版本。是否重新启动了apache?服务apache2在更换后不重新启动。我应该在哪里更改AppType?在FileMatch标记中:SetHandler应用程序/八位字节流