让apache-tomcat支持php
2016-08-31 17:52
281 查看
原环境为 Apache-tomcat-7.0,现在需要支持php 先装一个扩展wget http://ftp.gnu.org/gnu/libiconv/libiconv-1.14.tar.gz tar -zxf libiconv-1.14.tar.gzcd
libiconv-1.14./configure
--prefix=/usr/local/libiconv make && make install 编译php./configure
--prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc
--with-openssl --enable-cli --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd
--with-iconv=/usr/local/libiconv --with-freetype-dir --enable-maintainer-zts
--with-zlib --enable-xml --enable-rpath --enable-bcmath --enable-shmop
--enable-sysvsem --enable-inline-optimization --with-curl --enable-exif
--enable-mbregex --enable-fpm --enable-mbstring
--with-gd --enable-gd-native-ttf --with-mhash --enable-pcntl
--enable-sockets --with-xmlrpc --enable-zip --enable-soap
--with-mcrypt=/usr/local --enable-force-cgi-redirect --enable-cgi &&
make ZEND_EXTRA_LIBS='-liconv' && make install 修改Tomcat 配置Web.xml<servlet>
<servlet-name>php</servlet-name>
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class> <init-param>
<param-name>clientInputTimeout</param-name>
<param-value>200</param-value> </init-param> <init-param>
<param-name>debug</param-name> <param-value>0</param-value> </init-param> <init-param>
<param-name>executable</param-name>
<param-value>/usr/local/php/bin/php-cgi</param-value> </init-param> <init-param>
<param-name>passShellEnvironment</param-name>
<param-value>true</param-value> </init-param> <init-param>
<param-name>cgiPathPrefix</param-name> <param-value>/</param-value> </init-param>
<load-on-startup>5</load-on-startup></servlet> <servlet-mapping>
<servlet-name>php</servlet-name>
<url-pattern>*.php</url-pattern></servlet-mapping> <welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.php</welcome-file></welcome-file-list>
libiconv-1.14./configure
--prefix=/usr/local/libiconv make && make install 编译php./configure
--prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc
--with-openssl --enable-cli --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd
--with-iconv=/usr/local/libiconv --with-freetype-dir --enable-maintainer-zts
--with-zlib --enable-xml --enable-rpath --enable-bcmath --enable-shmop
--enable-sysvsem --enable-inline-optimization --with-curl --enable-exif
--enable-mbregex --enable-fpm --enable-mbstring
--with-gd --enable-gd-native-ttf --with-mhash --enable-pcntl
--enable-sockets --with-xmlrpc --enable-zip --enable-soap
--with-mcrypt=/usr/local --enable-force-cgi-redirect --enable-cgi &&
make ZEND_EXTRA_LIBS='-liconv' && make install 修改Tomcat 配置Web.xml<servlet>
<servlet-name>php</servlet-name>
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class> <init-param>
<param-name>clientInputTimeout</param-name>
<param-value>200</param-value> </init-param> <init-param>
<param-name>debug</param-name> <param-value>0</param-value> </init-param> <init-param>
<param-name>executable</param-name>
<param-value>/usr/local/php/bin/php-cgi</param-value> </init-param> <init-param>
<param-name>passShellEnvironment</param-name>
<param-value>true</param-value> </init-param> <init-param>
<param-name>cgiPathPrefix</param-name> <param-value>/</param-value> </init-param>
<load-on-startup>5</load-on-startup></servlet> <servlet-mapping>
<servlet-name>php</servlet-name>
<url-pattern>*.php</url-pattern></servlet-mapping> <welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.php</welcome-file></welcome-file-list>
相关文章推荐
- 使apache支持tomcat,php
- RHEL5 Apache+Tomcat整合,同时支持jsp与php
- Centos Apache和tomcat集成配置,同一时候支持PHP和JAVA执行
- Linux|CentOS+Nginx+Apache+MySQL+PHP+Tomcat的配置教程,完美支持PHP、JAVA
- RHEL5 Apache+Tomcat整合,同时支持jsp与php
- apache+php+tomcat的整合配置,重装系统的若干小技巧
- 编译安装apache+mysql+php 支持jpg,gd等
- FreeBSD 5.3安装Apache+PHP+MySQL+Tomcat
- 整合Windows 2000 + j2sdk(还要安装NetBeans或 eclipse及其配置) + apache2 + php-4.3.10 + mysql + Tomcat 4 + jk2(整合APACHE和TOMCAT)
- 配置Apache中的httpd ,让一个普通目录支持perl,不支持php
- Windows下Apache+Tomcat+MySQL+jsp+php的服务器整合配置经验总结
- apache+tomcat+jk+php配置手册
- Apache+Tomcat+Php+Mysql的集成
- Linux下整合Apache+Tomcat+MySQL+PHP
- (转帖)Linux下面PHP开发环境源码安装-php,mysql,apache以及图形支持库GD的安装
- Win下apache+php+Tomcat配置
- Windows下Apache+Tomcat+MySQL+jsp+php的服务器整合配置经验总结
- 让Tomcat支持PHP
- linux下Apache2.2.4 + tomcat5.5+php 一个IP配置多域名,虚拟主机
- 让php支持mysql,gd,apache,jpeg,freetype的编译配置指令