当前位置:首页 > 服务器技术 > apache

apache配置-apache2配置二级域名解析时无法解析php?

已经在服务商那边搞好了二级域名的指向。
httpd.conf:

        DocumentRoot /var/www/www/
    ProxyPassMatch ^/(.*.php)$ fcgi://127.0.0.1:10000/var/www/www/$1
    DirectoryIndex index.html index.php




  DocumentRoot /var/www/www/a
  ServerName a.abc.com
  DirectoryIndex  index.php


现在我可以通过a.abc.com访问到abc.com/a,但是里面的php脚本无法运行,这是为什么呢?

回复内容:

已经在服务商那边搞好了二级域名的指向。
httpd.conf:


        DocumentRoot /var/www/www/
    ProxyPassMatch ^/(.*.php)$ fcgi://127.0.0.1:10000/var/www/www/$1
    DirectoryIndex index.html index.php




  DocumentRoot /var/www/www/a
  ServerName a.abc.com
  DirectoryIndex  index.php


现在我可以通过a.abc.com访问到abc.com/a,但是里面的php脚本无法运行,这是为什么呢?

这多明显,你没有设置php转发代理。。。

ProxyPassMatch ^/(.*.php)$ fcgi://127.0.0.1:10000/var/www/www/a/$1

【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!