我遇到了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