reverse proxy question

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

reverse proxy question

Postby maarten » Sat Oct 22, 2011 4:42 pm

Hi

I've set up servoy server behind an apache server thats serving a website http://www.mysite.com (using a reverse proxy)

All works fine:
http://www.mysite.com/servoy-admin shows the servoy admin page etc..
However, http://www.mysite.com now resolves to the index.html page from Servoy. (showing the smart client starting page)

How do I make sure http://www.mysite.com keeps displaying the website?

Added settings to Apache Virtual host
Code: Select all
ProxyPass /tunnel ajp://myservoyserver:8009/tunnel flushpackets=on
ProxyPass / http://myservoyserver:8080/
ProxyPassReverse / http://myservoyserver:8080/



Added http connector to application_server/server/conf/server.xml
Code: Select all
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" connectionTimeout="60000" maxThreads="400" />


Added settings servoy-admin>Network Settings
Code: Select all
servoy.jnlpCodebaseOverride:    www.mysite.com


Thanks for any pointers.
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

Re: reverse proxy question

Postby jcompagner » Mon Oct 24, 2011 10:03 am

so you want everything from servoy working through www.mysite.com
but not the root?

you use this for smartclients?
Because if you do use it for smart client / should be mapped on the server server (for getting messages and so on)
That will make it tricky then i think, because what you want is that parts of / is servoy and some parts are not?
i guess you could move the complete site into webapps/ROOT folder of servoy?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: reverse proxy question

Postby maarten » Mon Oct 24, 2011 11:28 am

Hi Johan,

Thanks for replying.
I talked to Nicola Gervasi last night who gave me some good pointers.

1) no need to proxy the servoy root dir, also for safety. So servoy admin remains on whatever:8080/servoy-admin

2) I cleared "servoy.jnlpCodebaseOverride: http://www.mysite.com" in servor-admin>network settings, since this is only for smartclients. (i'm only aiming for webclient)

3) In the http://www.mysite.com Virtual Host file I've only defined proxy paths that are necessary and added:

 
Code: Select all
<Location "/servoy-webclient">
     # Enable compressions
     AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript     //helps compressing content
     ProxyPass ajp://127.0.0.1:8009/servoy-webclient flushpackets=on
     ProxyPassReverse http://127.0.0.1:8080/servoy-webclient
</Location>


Also add this path, otherwise images will be broken in the webclient
Code: Select all
   # Reverse proxy to let webclient access the images folder
   <Location "/images">
     ProxyPass ajp://127.0.0.1:8009/images
     ProxyPassReverse http://127.0.0.1:8080/images
   </Location>


iFrames on http://www.mysite.com working ok now when deeplinking to
http://www.mysite.com/servoy-webclient/ ss/s/mysolution/a/blabla



Hope this will help others improve their Apache Kung Fu skills ;-)
For ins and outs about reverse proxying Servoy , check http://www.sintpro.com . Thanks Nic!
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

Re: reverse proxy question

Postby ngervasi » Mon Oct 24, 2011 1:25 pm

Thanks Maarten, glad to have been useful.
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1485
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy


Return to Web Development

Who is online

Users browsing this forum: No registered users and 5 guests

cron