Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache2 / Tomcat redirect gives 404 error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
hip2
n00b
n00b


Joined: 03 Jun 2005
Posts: 2

PostPosted: Fri Jun 03, 2005 12:57 pm    Post subject: Apache2 / Tomcat redirect gives 404 error Reply with quote

Hi All,

I have two sites hosted with SSL. I need to redirect the homepage (www.heretostay.com & www.heretogo.com) to the Tomcat servlet url:
http://www.heretostay.com/pressata/servlet/domain/heretostay/listMenuItemsForCategory.action
&
http://www.heretogo.com/pressata/servlet/domain/heretogo/listMenuItemsForCategory.action

I first used the mod_rewrite to accomplish this, but when you transfer from http to https, all the session varibles are lost.

When I tried to use redirect, I get 404 errors.

Here is the vhosts.conf with the code:

<VirtualHost 10.17.77.70:80>
ServerName www.heretostay.com
ServerAlias heretostay.com
ServerAdmin webmaster@heretogo.com
Setenv VLOG /home/heretostay/www/logs/heretostay.com
CustomLog /var/log/apache2/heretostay_access_log combined
ErrorLog /var/log/apache2/heretostay_error_log
RewriteEngine ON
RedirectMatch ^/$ http://www.heretostay.com/pressata/servlet/domain/heretostay/listMenuItemsForCategory.action
# RewriteRule ^/$ /pressata/servlet/domain/heretostay/listMenuItemsForCategory.action [PT]
# RewriteRule ^/(.*)\.action /pressata/servlet/domain/heretostay/$1.action [PT]
</VirtualHost>

<VirtualHost 10.17.77.71:80>
ServerName www.heretogo.com
ServerAlias heretogo.com
ServerAdmin webmaster@heretogo.com
Setenv VLOG /home/heretogo/www/logs
CustomLog /var/log/apache2/heretogo_access_log combined
ErrorLog /var/log/apache2/heretogo_error_logCustomLog
RewriteEngine ON
RedirectMatch ^/$ http://www.heretostay.com/pressata/servlet/domain/heretogo/listMenuItemsForCategory.action
# RewriteRule ^/$ /pressata/servlet/domain/heretogo/listMenuItemsForCategory.action [PT]
# RewriteRule ^/(.*)\.action /pressata/servlet/domain/heretogo/$1.action [PT]
</VirtualHost>

<VirtualHost 10.17.77.70:443>
ServerName www.heretostay.com
ServerAlias heretostay.com
Setenv VLOG /home/heretostay/www/logs/heretostay.com
CustomLog /var/log/apache2/heretostay_access_log combined
ErrorLog /var/log/apache2/heretostay_error_log
DirectoryIndex index.html index.html.var
RewriteEngine ON
RedirectMatch ^/$ http://www.heretostay.com/pressata/servlet/domain/heretostay/listMenuItemsForCategory.action
# RewriteRule ^/$ /pressata/servlet/domain/heretostay/listMenuItemsForCategory.action [PT]
# RewriteRule ^/(.*)\.action /pressata/servlet/domain/heretostay/$1.action [PT]
</VirtualHost>

<VirtualHost 10.17.77.71:443>
ServerName www.heretogo.com
SSLEngine on
SSLCertificateFile /etc/ssl/certs/heretogo.crt
SSLCertificateKeyFile /etc/ssl/certs/heretogo.key
Setenv VLOG /home/heretogo/www/logs
CustomLog /var/log/apache2/heretogo_access_log combined
ErrorLog /var/log/apache2/heretogo_error_logCustomLog
DirectoryIndex index.html index.html.var
RewriteEngine ON
RedirectMatch ^/$ http://www.heretostay.com/pressata/servlet/domain/heretogo/listMenuItemsForCategory.action
# RewriteRule ^/$ /pressata/servlet/domain/heretogo/listMenuItemsForCategory.action [PT]
# RewriteRule ^/(.*)\.action /pressata/servlet/domain/heretogo/$1.action [PT]
</VirtualHost>

I also tried some other variations on the syntax:

Redirect / http://www.heretostay.com/pressata/servlet/domain/heretogo/listMenuItemsForCategory.action
&
RedirectMatch (.*)


What mod is used for the redirect?

Any insight would be appreciated...
Back to top
View user's profile Send private message
defkewl
Tux's lil' helper
Tux's lil' helper


Joined: 08 Feb 2005
Posts: 75
Location: Indonesia

PostPosted: Sat Jun 04, 2005 6:19 am    Post subject: Reply with quote

mod_jk
_________________
Not all things in life need reasoning
Visit my blog
Back to top
View user's profile Send private message
hip2
n00b
n00b


Joined: 03 Jun 2005
Posts: 2

PostPosted: Mon Jun 06, 2005 12:34 am    Post subject: Reply with quote

defkewl wrote:
mod_jk


ok, got that being called from an include in apache3.conf to 80_mod_jk.conf. And since Tomcat is running just fine, I think the problem is with a configuration.

could it be in Tomcat's server.xml or Apache's worker.properties?

Anybody have redirect workign with a Apache/Tomcat deployment?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum