我的Apache2服务器有问题。我在Debian OS上使用VDS。服务器将所有文件显示为纯文本。
下面是示例: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 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>我需要做什么?
发布于 2015-10-19 18:20:41
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>替换为:
<FilesMatch "\.php$">
SetHandler application/x-httpd-php-source
</FilesMatch>或将应用程序类型更改为: application/octet-stream或text/html
https://stackoverflow.com/questions/33211422
复制相似问题