This week's book giveaway is in the Design and Architecture forum.
We're giving away four copies of Communication Patterns: A Guide for Developers and Architects and have Jacqui Read on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

apache - RewriteRule - local tomcat = no login

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

is there anyone who switch on the light?

I ltry to do the following:
http://official.de/Intern/forum (apache) redirect to http://127.0.0.1:8081/forum (tomcat)

httpd.conf:
...
RewriteEngine on
RewriteRule ^.*/Intern/forum/(.*)$ http://127.0.0.1:8081/forum/$1 [P]
...

SystemGlobals.properties:
...
forum.link = /forum/
homepage.link = http://official.de/Intern/forum
redirect.absolute.paths = true
redirect.base.url =/Intern/forum/
proxied.context.path = /Intern/forum
...

Ok everything seems ok, but I'm unable to login.
If I type in username and password the page reload - but there is no 'your Profile'-page etc.
I can jump arround in the forum - quite nice but if i answer a topic or something like that I'm 'Anonymous'.

For testing I connect direct to the forum not over the apache, after disableing the redirect and proxied statement in the SystemGlobals.properties file - everything is ok. Login works the management Menue is available ...

Any hint?



[originally posted on jforum.net by humptydumpty1]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apache proxy rules aren't one of my Forte's... it may be related to cookies and making sure you're config file has the right URL for jForum.

Alternatively, I strongly recommend using the jk_module to connect TomCat and the Apache HTTPD servers. IMHO, it's far more seamless and trouble free than trying to keep all the proxy rules straight. Plus there are a lot of bonus stuff like a Tomcat ApacheConfig listener that can automatically create the Apache HTTPD config statements for ALL your webapps that just has to be included in your HTTPD config file.

The best place to start is http://tomcat.apache.org/connectors-doc/ But there are also a bunch of nice articles floating around on the Inet to help as well.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the problem is that you are changing the hostname, and that cookies are associated with it, so that when you log in your session gets stuck with the old server name.

I would suggest as monroe says to switch to using mod_jk to pass the request from apache httpd to tomcat, or using tomcat directly without apache. I should also point out that using mod_jk would also resolve possible problems your clients might have accessing port 8081.
[originally posted on jforum.net by andune76]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

sorry I had forget to tell you that everything works if the forum is direct below the main url

official.de/forum - works
official.de/Intern/forum - ist not working

Mybe I have na error in my SystemGlobals.properties?

Hmm, any Idea?

[originally posted on jforum.net by humptydumpty1]
 
It looks like it's time for me to write you a reality check! Or maybe a tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic