• Login returns to localhost

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #9987  by lucas.santana
 
Probally this is a problem in your server.xml file, verify if the settings are correct.
This file is located at your-jboss-installation\server\default\deploy\jboss-web.deployer\server.xml.
:D
Last edited by lucas.santana on Fri Apr 01, 2011 1:30 pm, edited 1 time in total.
 #9996  by seanwhe
 
Hi,

Would you have any idea on what to modify. There are two instances where localhost is referenced.

Do I use the FQDN or the IP address and do I need to modify both instances of localhost?

Sean
 #10000  by lucas.santana
 
Please, do two tests to me understand the problem:

Firstly Add this line in your OpenKM.cfg: application.url=http://the-name-of-your-host:8080/OpenKM/index.jsp
Restart the Jboss server and try again.

If don't work, replace the localhost reference in your server.xml file to IP of your server, also in your OpenKM.cfg ( application.url=http://your-IP-address:8080/OpenKM/index.jsp ).

Try now! :D

Greetings from new world.
 #10004  by seanwhe
 
Hi,

The application.url=http://the-name-of-your-host/OpenKM/index.jsp was always set in the OpenKM.cfg

So I tried replace all instances of localhost in server.xml with IP-address of server.

I try service jboss restart but end up rebooting the server
http://forum.openkm.com/viewtopic.php?f ... 673#p10003

I try to bring up OpenKM and this time all I get is a blank page. No login, no nothing. Blank.

So I go back to OpenKM.cfg and
Set application.url=http://the-name-of-your-host:8080/OpenKM/index.jsp

I reboot server.

Try access the web and still get blank. Now I hard refresh browser to see if it is a cache problem, I am no not using proxy so it cannot be proxy. Hmmm.

I go back to server/default/deploy/jboss-web.deployer/server.xml
and change ip-address back to localhost

I reboot server

Open URL and walla it is back. So it means that it does not matter whether
application.url=http://the-name-of-your-host/OpenKM/index.jsp
or
application.url=http://the-name-of-your-host:8080/OpenKM/index.jsp

But I still have logout to localhost.
Version is 5.0.3

Hope this helps.
 #10006  by seanwhe
 
Got it!!!

I am using Apache and therefore have integrated the AJP in accordance with
http://wiki.openkm.com/index.php/Apache

I used this VirtualHost configuration
Code: Select all
<VirtualHost *:80>
  ServerName openkm.your-domain.com
  ProxyPass / ajp://localhost:8009/OpenKM/
  ProxyPassReverse / http://openkm.your-domain.com/OpenKM/
  ErrorLog /var/log/apache2/your-domain.com-error.log
  CustomLog /var/log/apache2/your-domain.com-access.log combined
 
  RewriteEngine on
  RewriteCond %{REQUEST_URI} /OpenKM*
  RewriteRule ^(/.*)$ http://localhost:8080$1 [P]
 
  RequestHeader edit X-GWT-Module-Base ^(http://openkm.your-domain)/frontend/(.*)$ $1/OpenKM/frontend/$2
</VirtualHost>
The example has a slight error and should be
Code: Select all
<VirtualHost *:80>
  ServerName openkm.your-domain.com
  ProxyPass / ajp://localhost:8009/OpenKM/
  ProxyPassReverse / http://openkm.your-domain.com/OpenKM/
  ErrorLog /var/log/apache2/your-domain.com-error.log
  CustomLog /var/log/apache2/your-domain.com-access.log combined
 
  RewriteEngine on
  RewriteCond %{REQUEST_URI} /OpenKM*
  RewriteRule ^(/.*)$ http://F.Q.D.N:8080$1 [P]
 
  RequestHeader edit X-GWT-Module-Base ^(http://openkm.your-domain)/frontend/(.*)$ $1/OpenKM/frontend/$2
</VirtualHost>
Once I changed this the RewriteRule to this RewriteRule ^(/.*)$ http://F.Q.D.N:8080$1 [P] and service apache2 restart I can login and on logout I am returned to the home login at http://F.Q.D.N:8080/OpenKM/com.openkm.f ... /index.jsp

Now the only issue is that I login at
http://F.Q.D.N/com.openkm.frontend.Main/index.jsp and am logged out to
http://F.Q.D.N:8080/OpenKM/com.openkm.f ... /index.jsp

Any hint on how to fix that?

Thanks

I modified http://wiki.openkm.com/index.php/Apache in accordance.
 #10046  by jllort
 
It might be the same using virtual host than dedicated, you must have the same apache control level. Try the apache proxy configuration.
 #10097  by pavila
 
@seanwhe I'm not sure there is an error in the corresponding VirtualHost configuration. I think you are mixing two different deploy scenarios. The configuration with the X-GWT-Module-Base header modified is use to obtain an OpenKM access URL without the /OpenKM context. In my test, this is working fine but keep on mind that this is intended to be used only on 5.1 as a experimental feature.

I can't really see this configuration is not working, so I have reverted your wiki modification. A better place to discuss this would be the "discussion" tab in the Third-party software integration: Apache page.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.