Hi! A server.xml's split de Tomcat is: <Connector port="8080" redirectPort="8443" minSpareThreads="25" connectionTimeout="20000" maxSpareThreads="75" maxThreads="150"> </Connector> <Connector port="8009" redirectPort="8443" protocol="AJP/1.3"> </Connector> <Engine defaultHost="localhost" name="Catalina"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/> <Listener className="org.apache.jk.config.ApacheConfig" modJk="/usr/lib/apache2/modules/mod_jk.so"/>
<Host appBase="webapps" name="localhost" xmlValidation="false"> <Context path="/EjemploEE-WebModule"> </Context> Pid Ster wrote: > > On 25/10/2009 12:17, frpll wrote: >> >> >> >> Pid Ster wrote: >>> >>> On 24 Oct 2009, at 19:38, frpll<jose_lopez_r...@telefonica.net> wrote: >>> >>>> >>>> Hi everyone! >>>> I have installed Apache2.2 and mod_jk 1.2.25. I have configured >>>> httpd.conf >>>> workers.properties, uriworkermap.properties, etc... Apache 2.2 work >>>> fine, >>>> Tomcat 5.5.20 work fine but connector don't work fine. When I open >>>> firefox >>>> and I type the direction http://domain.com. If my config virtual >>>> server >>>> Apache have Indexed display directories. If I cliking on index.jsp >>>> Tomcat >>>> redirect to $CATALINA_HOME//webapps/ROOT/index.jsp, don't display >>>> index.jsp >>>> of my application. Why? Some idea ? I cant to sent file's >>>> configuration. >>> >>> I'd guess your config doesn't work. >>> You should post it, so someone here can assist. >>> >>> p >>> > > You didn't post server.xml. > >> Hi! >> My config is: >> /etc/apache2.conf >> >> ServerRoot "/etc/apache2" >> LockFile /var/lock/apache2/accept.lock >> PidFile ${APACHE_PID_FILE} >> Timeout 300 >> KeepAlive On >> MaxKeepAliveRequests 100 >> KeepAliveTimeout 15 >> <IfModule mpm_prefork_module> >> StartServers 5 >> MinSpareServers 5 >> MaxSpareServers 10 >> MaxClients 150 >> MaxRequestsPerChild 0 >> </IfModule> >> <IfModule mpm_worker_module> >> StartServers 2 >> MaxClients 150 >> MinSpareThreads 25 >> MaxSpareThreads 75 >> ThreadsPerChild 25 >> MaxRequestsPerChild 0 >> </IfModule> >> User ${APACHE_RUN_USER} >> Group ${APACHE_RUN_GROUP} >> <Files ~ "^\.ht"> >> Order allow,deny >> Deny from all >> </Files> >> DefaultType text/plain >> HostnameLookups Off >> ErrorLog /var/log/apache2/error.log >> LogLevel warn >> # Include module configuration: >> Include /etc/apache2/mods-enabled/*.load >> Include /etc/apache2/mods-enabled/*.conf >> >> # Include all the user configurations: >> Include /etc/apache2/httpd.conf >> >> # Include ports listing >> Include /etc/apache2/ports.conf >> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" >> combined >> LogFormat "%h %l %u %t \"%r\" %>s %b" common >> LogFormat "%{Referer}i -> %U" referer >> LogFormat "%{User-agent}i" agent >> ServerTokens Full >> ServerSignature On >> # Include generic snippets of statements >> Include /etc/apache2/conf.d/ >> >> # Include the virtual host configurations: >> Include /etc/apache2/sites-enabled/ >> >> /etc/apache2/httpd.conf >> >> JkWorkersFile /etc/libapache2-mod-jk/workers.properties >> JkLogFile /var/log/apache2/mod_jk.log >> JkLogLevel info >> JkShmFile /var/log/apache2/mod_jk.shm >> JkMountFile /etc/apache2/uriworkermap.properties >> JkMount /*.jsp ajp13_worker >> JkMount /*/servlet/ ajp13_worker >> JkMount /*/jsp-examples/* worker1 >> JkMount /*/servletsexamples/* worker1 >> JkMount /*/Subastas/* worker1 >> >> /etc/libapache2-mod-jk/workers.properties >> >> workers.tomcat_home=/opt/apache-tomcat >> workers.java_home=/opt/jdk1.6.0_03 >> worker.list=worker1 >> worker.list=ajp13_worker >> worker.ajp13_worker.port=8009 >> worker.ajp13_worker.host=10.0.0.9 >> worker.ajp13_worker.type=ajp13 >> worker.ajp13_worker.lbfactor=1 >> worker.worker1.port=8009 >> worker.worker1.host=10.0.0.9 >> worker.worker1.type=ajp13 >> worker.worker1.lbfactor=2 >> worker.loadbalancer.type=lb >> worker.loadbalancer.balance_workers=ajp13_worker > > I'm not the mod_jk expert around here, but it looks like you've defined > two workers, where you only need one. There's also a loadbalancer that > you're not using. > > Try just using "ajp13_worker" instead of "worker1". > > Is there an AJP Connector for port 8009 defined in your Tomcat server.xml? > > >> /etc/apache2/uriworkermap.properties >> >> /admin/*=worker1 >> /manager/*=worker1 >> /jsp-examples/*=worker1mods-available > > Is "worker1mods-available" defined anywhere? > > >> /servlets-examples/*=worker1 >> /examples/*=worker1 > > Why not remove the unnecessary example definitions? > > >> /*.jsp=ajp13_worker > > Try removing the slash: *.jsp=ajp13_worker > > http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html > > >> /jkmanager=jkstatus > > >> /etc/apache2/sites-available/auction >> >> NameVirtualHost 10.0.0.9 >> <VirtualHost subastas.myserver.com> >> ServerAdmin webmas...@localhost >> ServerName subastas.myserver.com >> DocumentRoot /opt/apache-tomcat/webapps/Auction >> <Directory /> >> Options FollowSymLinks >> AllowOverride None >> </Directory> >> <Directory /opt/apache-tomcat/webapps/Auction> >> Options -Indexes FollowSymLinks MultiViews >> AllowOverride None >> Order allow,deny >> allow from all >> </Directory> > > You are publishing the webapp as the DocumentRoot, which is why you're > seeing the JSPs in the indexed dir. This is a security issue. > > If you're going to use HTTPD and Tomcat, make a parallel directory for > your static files. E.g. > > /path/to/sites/www.yoursite.com/httpdocs > /path/to/sites/www.yoursite.com/httpdocs/images > > /path/to/sites/www.yoursite.com/webapps > /path/to/sites/www.yoursite.com/webapps/ROOT > > > If you want the "Auction" webapp to be the default one, name it ROOT. > > There's no reference to the mod_jk config inside this virtual host, I > think you need to add that. See docs URL above. > > Unless you've set it elsewhere, you'll probably also need to add > index.jsp to the DirectoryIndex definition for this virtual host. > > > p > > > >> ErrorLog /var/log/apache2/error.log >> >> # Possible values include: debug, info, notice, warn, error, >> crit, >> # alert, emerg. >> LogLevel warn >> >> CustomLog /var/log/apache2/access.log combined >> ServerSignature On >> >> >> </VirtualHost> >> >> /etc/apache2/mods-available/jk.load >> >> LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so >> >> There's nothing else. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://www.nabble.com/mod_jk-don%27t-work-fine-tp26041828p26047876.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org