我遇到了Apache2服务器的问题。 我使用VDS和Debian操作系统。 服务器以纯文本格式显示所有文件。Apache将php页面加载为文本
这里例如:click
Apache配置:
<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 [email protected]
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 [email protected]"
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>
我需要做什么?
请确保安装PHP。 – Criesto
@Criesto apt-get安装php5 php-pear php5-mysql。结果> php5已经是最新版本了。 – Roman
你重新启动了Apache吗? '服务apache2重启' – Criesto