이유를 모르겠습니다. php 파일을 실행하는 대신, 그는 다운로드로 나를 서비스합니다.아파치는 php 파일을 실행하지 않지만 mod_php5는 활성화되어 있습니다.
다운로드 된 파일에는 PHP 소스가 있습니다.
내 테스트 파일은, 그것은 매우 간단 info.php라고<?php
phpinfo();
내 가상 호스트 :
AddType application/x-httpd-php .php
: 아파치의 conf에서
<VirtualHost some_ip:80>
DocumentRoot /var/www/vhosts/my_vhost/htdocs
ServerName www.my_vhost.com
<Directory /var/www/vhosts/my_vhost/htdocs/>
Options All -MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/www/vhosts/my_vhost/logs/error.log
LogLevel warn
CustomLog /var/www/vhosts/my_vhost/logs/access.log combined
</VirtualHost>
내가 라인을 가지고 Apache 사용 모듈 :
apache2ctl -M
Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
actions_module (shared)
alias_module (shared)
auth_basic_module (shared)
auth_digest_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
bw_module (shared)
cgi_module (shared)
dav_module (shared)
dav_fs_module (shared)
dav_lock_module (shared)
dav_svn_module (shared)
authz_svn_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
fcgid_module (shared)
include_module (shared)
mime_module (shared)
negotiation_module (shared)
perl_module (shared)
php5_module (shared)
python_module (shared)
reqtimeout_module (shared)
rewrite_module (shared)
setenvif_module (shared)
ssl_module (shared)
status_module (shared)
suexec_module (shared)
userdir_module (shared)
wsgi_module (shared)
Syntax OK
무엇을 디버깅하고 해결해야합니까?
phpmyadmin도 설치되어 있으며 제대로 작동합니다.
은 .htaccess 또는 다른 .conf 파일의 add-type 지시문 일 수 있으며 apache2.conf에있는 지시문을 무시합니다. –
DirectoryIndex ??? – slash28cu
DirectoryIndex가 누락 되었습니까? 그것이 어떻게 설정되어야 하는가? – apelliciari