+ -
当前位置:首页 → 问答吧 → apache虚拟机不执行php文件(浏览器打开后弹出下载文件窗口)

apache虚拟机不执行php文件(浏览器打开后弹出下载文件窗口)

时间:2007-12-14

来源:互联网

主站运行正常
其它VirtualHost均不执行php
复制内容到剪贴板
代码:
NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "C:/AppServ/www"
    ServerName localhost
    ServerAlias localhost
    ErrorLog logs/localhost-error_log
    CustomLog logs/localhost_log common
</VirtualHost>

<VirtualHost 127.0.0.2:80>
    ServerAdmin [email protected]
    DocumentRoot  "C:/AppServ/www2"
<Directory />
    Options FollowSymLinks ExecCGI Indexes
    DirectoryIndex index.php index.html index.htm index.asp
    AllowOverride All
    Order deny,allow
    Allow from all
    Satisfy all
</Directory>
    ServerName 127.0.0.2
    ErrorLog logs/2.error_log
    CustomLog logs/2.access_log common
</VirtualHost>

<VirtualHost 127.0.0.3:80>
    ServerAdmin [email protected]
    DocumentRoot  "C:/AppServ/www3"
<Directory />
    Options FollowSymLinks ExecCGI Indexes
    DirectoryIndex index.php index.html index.htm index.asp
    AllowOverride All
    Order deny,allow
    Allow from all
    Satisfy all
</Directory>
    ServerName 127.0.0.3
    ErrorLog logs/3.error_log
    CustomLog logs/3.access_log common
</VirtualHost>


<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot  C:/AppServ/www4
    ServerName 127.0.0.4
    ServerAlias 127.0.0.4
<Directory />
    AllowOverride All
    Order deny,allow
    Allow from all
#    Satisfy all
</Directory>
AddType application/x-httpd-php .php
    ErrorLog logs/4.error_log
    CustomLog logs/4.access_log common
</VirtualHost

作者: fanqi1234   发布时间: 2007-12-13

抓包看看吧

作者: sskaje   发布时间: 2007-12-13

只有虚拟机不可以吗?非虚拟机的可不可以?

作者: gleon   发布时间: 2007-12-17

很奇怪。

<VirtualHost *:80>这个就执行正常。
后边<VirtualHost 127.0.0.2:80>这几个就不执行php

作者: fanqi1234   发布时间: 2007-12-18

最后面加一行

AddType application/x-httpd-php .php

作者: Duron   发布时间: 2007-12-21

在什么地方添加?

作者: fanqi1234   发布时间: 2007-12-21

把127.0.0.*换成别的吧,

作者: kinganeng   发布时间: 2008-06-19

热门下载

更多