quinta-feira, 28 de janeiro de 2010

Integração TomCat 6 x86 + IIS 7 - Parte II

Continuando o tutorial agora vou mostrar como fica a configuração no IIS.

1) Crie um diretório virtual 



2) Vamos dar permissões para a execução dessa .dll



Vamos editar as permissões click em Edit Feature Permissions






Agora verifique se o ISAPI .dll esta ativo





3) Vamos agora configurar o filtro


Click em add



4) Vamos liberar as restrições



Click em Add


Ficará assim


Agora de um restart no servidor IIS e faça um teste no navegador.



e agora com o redirecionamento

 

Pronto assim encerro esse tutorial de Integração de TomCat 6 + IIS 7


























Integração TomCat 6 x86 + IIS 7

Primeiro faça o download dos arquivos necessarios

Java Version 6 Update 17
http://www.java.com/en/download/manual.jsp
Apache Tomcat
http://tomcat.apache.org/download-60.cgi
Tomcat Connectors (mod_jk) Downloads
http://tomcat.apache.org/download-connectors.cgi

Após ter feito o download, instale o JDK na pasta C:\Java\JDK e o JRE no diretório C:\Java\JRE.

 Em seguida execute o instalador do TomCat 6 selecione as opções a seguir:



Mude o diretorio de instalação para C:\TomCat e na hora de escolher o JRE informe o diretório onde foi isntalado o JRE em C:\Java\JRE, finalize a instação.
Feito isso temos de setar as variaveis de ambiente para que o tomcat rode.

CATALINA_HOME = C:\TomCat
JAVA_HOME = C:\Java\JDK

e no path inclua o caminho %CATALINA_HOME%/bin e %JAVA_HOME%/bin, tente executar o TomCat se o mesmo não iniciar copie a msvcr71.dll da pasta C:\Java\JDK\bin para o diretório C:\TomCat\bin, e tente novamente que deve funcionar.

Agora crie uma pasta ISAPI em C:\TomCat\ e copie isapi_redirect-1.2.28.dll do conector para dentro dela e renomeie para isapi_redirect.dll.

Crie um arquivo isapi_redirect.properties dentro da pasta C:\TomCat\ISAPI igual ao modelo:

#Configuration file for the Jakarta ISAPI Redirector

#The path to the ISAPI Redirector Extension, relative to the website
#This must be is a virtual directory with execute privileges
extension_uri=/jakarta/isapi_redirect.dll

#Full path to the log file for the ISAP Redirector
log_file=c:\tomcat\logs\isapi_redirect.log

#Log level (debug, info, warn, error or trace)
log_level=info

#Full path to the workers.properties file
worker_file=c:\tomcat\conf\workers.properties

#Full path to the uriworkermap.properties file
worker_mount_file=c:\tomcat\conf\uriworkermap.properties




e mais esse dois aquivos dentro da pasta C:\TomCat\conf

uriworkermap.properties

#uriworkermap.properties - IIS
#
#This file provides sample mappings for example wlb
#worker defined in workermap.properties.minimal
#The general syntax for this file is:
#[URL]=[Worker name]

/admin/*=wlb

/manager/*=wlb
/examples/*=wlb
#Optionally filter out all .jpeg files inside that context
#For no mapping the url has to start with exclamation (!)

#!/servlets-examples/*.jpeg=wlb


#

#Mount jkstatus to /jkmanager
#For production servers you will need to
#Secure the access to the /jkmanager url
#
/jkmanager=jkstatus





workers.properties

#workers.properties.minimal -
#
#This file provides minimal jk configuration properties needed to
#connect to Tomcat.
#
#The workers that jk should create and work with
#

worker.list=wlb,jkstatus

#Defining a worker named ajp13w and of type ajp13
#Note that the name and the type do not have to match.
#
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009

#
#Defining a load balancer
#

worker.wlb.type=lb
worker.wlb.balance_workers=ajp13w

#Define status worker

worker.jkstatus.type=status




Na próxima parte vou mostrar como fica a configuração no IIS.