服务器使用的apache反代tomcat
apache2.2,下载php5.4.9(php5.5+使用apache2.4才行)
apache配置
PHPIniDir "E:/php549" LoadModule php5_module "E:/php549/php5apache2_2.dll" <IfModule mod_php5.c> AddType application/x-httpd-php .php AddType application/x-httpd-php .html .htm </IfModule> <VirtualHost *:80> ServerName www.java.com DirectoryIndex index.php index.html index.htm index.jsp #JkMount /* ajp13 #JkUnMount /php/* ajp13 #JkAutoAlias "D:\webapps" ProxyPass /php ! #不进行代理的目录 ProxyPassReverse /php ! ProxyPass / http://www.java.com:8080/ ProxyPassReverse / http://www.java.com:8080/ </VirtualHost>
php配置(复制php.ini-development到php.ini)
#相关模块开启,去掉前面的;号 #添加模块目录 extension_dir = "E:/php549/ext"
基本就ok了,看起来很简单,但真的还是花了些功夫才跑通
时间: 2024-11-03 22:52:52