已经在服务商那边搞好了二级域名的指向。
httpd.conf:
<code><VirtualHost *:80>
DocumentRoot /var/www/www/
ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:10000/var/www/www/$1
DirectoryIndex index.html index.php
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/www/a
ServerName a.abc.com
DirectoryIndex index.php
</VirtualHost>
</code>现在我可以通过a.abc.com访问到abc.com/a,但是里面的php脚本无法运行,这是为什么呢?
已经在服务商那边搞好了二级域名的指向。
httpd.conf:
<code><VirtualHost *:80>
DocumentRoot /var/www/www/
ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:10000/var/www/www/$1
DirectoryIndex index.html index.php
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/www/a
ServerName a.abc.com
DirectoryIndex index.php
</VirtualHost>
</code>现在我可以通过a.abc.com访问到abc.com/a,但是里面的php脚本无法运行,这是为什么呢?
这多明显,你没有设置php转发代理。。。
立即学习“PHP免费学习笔记(深入)”;
<code class="apache">ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:10000/var/www/www/a/$1</code>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号