Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » Proxy support in development(ReverseProxy)
Proxy support in development [message #1831432] Wed, 19 August 2020 12:42 Go to next message
Eclipse UserFriend
Hello,

how can I use reverseProxy (Apache) with Eclipse Scout Jetty server.

I have application running on Windows OS, Eclipse Scout, running from Eclipse (Jetty server), local development.

App is configured to use subdomains, like *.mydomain.test -> where * is subdomain and on login I am selecting company from database based on subdomain from request. So one subdomain, one company. Like saas.

Now I would like to offer company1.mydomain.test/portal option
In login I would parse request, check if it contains /portal and load another outline, not default one.

How can I do this in local development. To route:
*.mydomain.test/portal -> *mydomain.test:8082

Currenty, accessing *.mydomain.test/portal gives 404 becouse .war "portal" is not found.

Are these steps valid:
1. Install Apache Server
2. Enable required mod_proxy modules
3. Configure ProxyPass and ProxyPassReverse in apache vhost configuration....

Is there any tutorial, am I on right path?

Thanks
Re: Proxy support in development [message #1831476 is a reply to message #1831432] Thu, 20 August 2020 08:52 Go to previous message
Eclipse UserFriend
I guess this question has more to do with web-servers than with the Scout framework. Over-simplified Scout is just a Servlet which processes a HTTP request. Everything that happens before HttpServlet#doPost is called, is web-server specific and cannot be answered in this forum.

Which outline is loaded on start-up is up to you as a programmer (see AbstractDesktop#execDefaultView, which is typically used to call activateOutline(IOutline)).

You could configure your proxy to pass the sub-domain name as query parameter to your scout application:

Example: foo.mydomain.com --> www.mydomain.com/?domain=foo

In your Scout application you could access that parameter in AbstractDesktop#execDefaultView with getStartupRequestParam(String propertyName).

Personally I would not do that. Instead I'd rather have a DB table user with login/password, and have an additional column in that table, which controls which Outline is loaded by default when that user logs into the application.

Previous Topic:Blank login form
Next Topic:SQL.selectInto delivers same record
Goto Forum:
  


Current Time: Sun Jul 13 12:50:43 EDT 2025

Powered by FUDForum. Page generated in 0.02635 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top