RE: [users@httpd] Redirection on apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have setup mod_jk module into my apache as following:

Mod_jk.conf
-----------
<IfModule !mod_jk.c>
  LoadModule jk_module /opt/hpws/apache/modules/mod_jk.so
</IfModule>

JkWorkersFile /opt/hpws/apache/conf/workers.properties
JkLogFile /opt/hpws/apache/logs/jk.log
JkLogLevel emerg

JkMount /manager ajp13
JkMount /manager/* ajp13

JkMount /tomcat-docs ajp13
JkMount /tomcat-docs/* ajp13

JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /webdav ajp13
JkMount /webdav/* ajp13

Workers.properties
------------------
workers.tomcat_home=/opt/hpws/tomcat
workers.java_home=/opt/java1.3
ps=/
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13

httpd.conf
----------
...
...
...
Listen 80
...
...
...

Include conf/mod_jk.conf

Listen 3000

<VirtualHost *:3000>
  ServerName www.servername.com
  JkMount /* ajp13
</VirtualHost>

...
...
...

Server.xml
----------
...
...
 <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="8081" minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="100" debug="0" connectionTimeout="20000"
               useURIValidationHack="false" disableUploadTimeout="true" />
...
...
<Context path="/abc" docBase="/home/abc/" debug="0"
                 reloadable="true" crossContext="true" />
...
...


I should browse http://www.servername.com:8081/abc in order to access abc context path. And it works now.

>From above config in order to access http://www.servername.com:8081/abc from apache I should access through http://www.servername.com:3000/abc .

I want to access URL http://www.servername.com:8081/abc only by typing http://www.servername.com:3000 in the browser. Is it still possible by using mod_jk? How to make it works? Thanks.

Thanks.

Regards,
Franky Ronaldy

-----Original Message-----
From: g.lams@xxxxxxxxxx [mailto:g.lams@xxxxxxxxxx] 
Sent: Thursday, March 24, 2005 4:40 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re: [users@httpd] Redirection on apache

"Ronaldy, Franky" <franky.ronaldy@xxxxxx> wrote on 24/03/2005 08.33.23:

> Hi All
> 
> This is may be a dummy question. I have a context (let say context name
> is abc) in the tomcat. I would like to set new virtual host in my apache
> which will automatically redirect to that abc context in the tomcat when
> I access this new virtual host. How can I do that? Thank you in advance.
> 

I've 2 virtual host set-up only for tomcat redirection, using mod_jk2 
(!!you should use jk now!!, at the time of my setup, jk2 was advised with 
apache2)
Here is what I've done:

- Apache with DSO support + mod_jk2 connector

JK2 needs two configurationf files:
- jk2.properties in /opt/jakarta/tomcat/conf, used by Tomcat
- workers2.properties, used by the web server. With the SuSe's 
distribution, it's in /etc/apache2

In httpd.conf:

#
# JK2 is the Apache/Tomcat connector
#
LoadModule jk2_module /usr/lib/apache2/mod_jk2.so

JkSet config.file /etc/apache2/workers2.properties

In workers2.properties

# Uri mapping
[uri:www.mydomain.org:80/*]
worker=ajp13:localhost:8009

In the virtual host configuration file

<Location "/">
   JkUriSet worker ajp13:localhost:8009
</Location>

I hope it helps

Gaël


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux