Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-10-2010, 12:02 PM
Intermediate Member
 
Posts: 18
Default html zimlet tab intrAnet

I have a zimlet tab pulling a web-app from an intrAnet ONLY web server (not available on the Internet.) The tab doesn't work when the staffer is accessing the Zimbra web-mail from outside our local network. Without actually putting my webapp on the Internet is there a way to proxy that application through when the user is outside the our internal LAN? I thought maybe the proxy servlet but that seems to be talking about AJAX requests and this is a whole webapp.

Thoughts?
Rois Cannon
Reply With Quote
  #2 (permalink)  
Old 12-13-2010, 01:54 AM
Zimlet Guru & Moderator
 
Posts: 288
Default

It should be possible to "proxy" the app, but the way to do it will probably change with what you want to display in zimbra.

What does your zimlet actually do? Does it make an iframe in a zimlet tab?
Reply With Quote
  #3 (permalink)  
Old 12-13-2010, 08:07 AM
Intermediate Member
 
Posts: 18
Default

I altered the sample zimlet com_zimbra_tabiframe to point to my internal LAN webserver.

Thanx for the help.
Rois Cannon
Reply With Quote
  #4 (permalink)  
Old 12-14-2010, 12:55 AM
Zimlet Guru & Moderator
 
Posts: 288
Default

You can create a proxy accessible externally.
You set it to allow you with an url to access your internal LAN webserver.
Then you use this url in the iframe of the zimlet.

Since you don't want to actually put your webapp on the Internet accessible to anyone, you can limit the access to the proxy by checking for example if the person accessing the proxy is authenticated by zimbra.
Reply With Quote
  #5 (permalink)  
Old 12-14-2010, 11:01 AM
Intermediate Member
 
Posts: 18
Default

Are you talking about a completely separate "reverse" proxy server on our firewall?

I got the proxy to work in the zimlet tab but it only works on the initial page. It doesn't rewrite the links correctly so the app doesn't appear to function.

For example (trying to make a Hesk help desk accessible to staff when outside the LAN):
Internal ONLY address to Hesk is
Code:
http://hesk.myinternaldomain.com/
The proxy URL in the js file is
Code:
https://mydomain.com/service/proxy?target=http://hesk.myinternaldomain.com/
Initial page does show up in the tab but it's not formatted correctly so css files aren't making it through the proxy. "Submit a ticket" link should be
Code:
http://hesk.coosbay.cardinal-services.com/index.php?a=add
when NOT through a proxy so the proxy address should be
Code:
https://mydomain.com/service/proxy?target=http://hesk.coosbay.cardinal-services.com/index.php?a=add
but it's showing up as
Code:
https://zimbra.cardinal-services.com/service/index.php?a=add
Mixing and matching URL parts.

Sorry I'm a newbie to zimlet writing so I'm mostly copying samples zimlets and altering at this point. Can this be done through a zimlet tab? I'm happy to do the reading and figure this out if you could point me at a zimlet page page with instructions and/or samples that would be great. Here is the js from the zimlet tab sample with my alterations of the com name and source URL.
Code:
/*
 * ***** BEGIN LICENSE BLOCK *****
 * Zimbra Collaboration Suite Zimlets
 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Zimbra, Inc.
 * 
 * The contents of this file are subject to the Zimbra Public License
 * Version 1.3 ("License"); you may not use this file except in
 * compliance with the License.  You may obtain a copy of the License at
 * http://www.zimbra.com/license.
 * 
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
 * ***** END LICENSE BLOCK *****
 */

/**
 * Defines the Zimlet handler class.
 *   
 */
function com_zimbra_heskbeta_HandlerObject() {
}

/**
 * Makes the Zimlet class a subclass of ZmZimletBase.
 *
 */
com_zimbra_heskbeta_HandlerObject.prototype = new ZmZimletBase();
com_zimbra_heskbeta_HandlerObject.prototype.constructor = com_zimbra_heskbeta_HandlerObject;

/**
 * This method gets called by the Zimlet framework when the zimlet loads.
 *  
 */
com_zimbra_heskbeta_HandlerObject.prototype.init =
function() {

	this._simpleAppName = this.createApp("HelpDeskBETA", "HeskIcon", "HelpDeskBETA");

};

/**
 * This method gets called by the Zimlet framework each time the application is opened or closed.
 *  
 * @param	{String}	appName		the application name
 * @param	{Boolean}	active		if true, the application status is open; otherwise, false
 */
com_zimbra_heskbeta_HandlerObject.prototype.appActive =
function(appName, active) {
	
	switch (appName) {
		case this._simpleAppName: {
		
			var app = appCtxt.getApp(appName); // get access to ZmZimletApp

			break;
		}
	}
	
	// do something
};

/**
 * This method gets called by the Zimlet framework when the application is opened for the first time.
 *  
 * @param	{String}	appName		the application name		
 */
com_zimbra_heskbeta_HandlerObject.prototype.appLaunch =
function(appName) {

	switch (appName) {
		case this._simpleAppName: {
			// do something
		
			var app = appCtxt.getApp(appName); // get access to ZmZimletApp

			app.setContent("<iframe id=\"tabiframe-app\" name=\"tabiframe-app\" src=\"https://zimbra.mydomain.com/service/proxy?target=http://hesk.mydomain.com\" width=\"100%\" height=\"100%\" /></iframe>"); // write HTML to app

			break;
		}
	}

};
Thx for the help
Rois Cannon
Reply With Quote
  #6 (permalink)  
Old 12-15-2010, 01:09 AM
Zimlet Guru & Moderator
 
Posts: 288
Default

Quote:
Originally Posted by gimecoffee View Post
Are you talking about a completely separate "reverse" proxy server on our firewall?
Yes, I was talking about creating your own proxy.
Zimbra proxy is not really effective to display web page.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.