Developer forum

Forum » CMS - Standard features » Reverse proxy
Anders Ebdrup
Reply

Hi Dynamicweb,

 

Does anyone have experience with setting up Dynamicweb behind a reverse proxy server?

 

Best regards, Anders


Replies

 
Scott Forsyth
Reply

Hi Anders,

I've done this a few times. What questions do you have?

For the most part it works well, but here's a thread about the base href for HTTPS. That would be useful to be aware of.

http://developer.dynamicweb.com/forum/cms-standard-features/cms-standard-features/base-href-is-it-really-needed.aspx

Thanks,

Scott

 
Anders Ebdrup
Anders Ebdrup
Reply

Hi Scott,

 

We have a site www.site.com which have to be located in a subfolder as www.site.com/site/. How can this be achieved in Dynamicweb? Any help will be appreciated :-)

 

Best regards, Anders

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Hi Anders,

I can probably provide the URL Rewrite rules for this. However, can you explain further which site will be the root and which will be in /site/? Are both Dynamicweb sites? And do you manage both?

Thanks,

Scott

 
Anders Ebdrup
Anders Ebdrup
Reply

Hi Scott,

 

We have no access to the root site, which is not a Dynamicweb site, so everything has to be done from Dynamicweb which is placed in /site/.

Help this is enough to solve the challenge?

 

Best regards, Anders

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Hi Anders,

This is different than what I was envisioning. 

Dynamicweb doesn't run from a subfolder by default. There are some absolute paths used on various references. For example, /Admin/public is often used. That's for the frontend. The backend has even more references.

It is possible to pull off but it will require some messing around with a reverse proxy. Do you have access to a reverse proxy that sits in front of the site?

Changing the path to a subfolder makes the mapping much more difficult because you will need to either:

  1. Rewrite all the paths in the pages using Outbound rules. This works for redirects and common resources, but it's almost impossible to handle references in Javascript files and such. And there's a performance hit to do this on the fly.
  2. If you can add a rule for /Admin and /Files, it may work. That means that the primary site won't be able to have content in /Admin or /Files. This way you can map /Files to /Site/Files and /Admin to /Site/Admin.

Easier options could be to use a cname (e.g. site.domain.com) rather than a vdir (e.g. domain.com/site). Then the original and the proxied site both live at the same level so calls to all resources will work. That can work by sharing the same IIS site as another site. However, unless you are on a shared host or something, it would be much easier to just give the new site its own IIS site.

I have merged some sites so that part of the domain is served by one site, and part is served by another site. One would be a Dynamicweb site, and one would be a customer's legacy site that hasn't been migrated to Dynamicweb yet. That is possible, but it's a fair bit of work and it requires that you have access to the proxy server and that you can hijack some paths in the root of the site for the 2nd site.

Hopefully that gives some idea of some options and which challenges to try to work around. If you explain further about the details I can see if I can help further.

Thanks,

Scott

 
Anders Ebdrup
Anders Ebdrup
Reply

Dear Scott,

 

This request is now present again, so I am curious if you have had any experience with setting up this now, where we have Dynamicweb located in a subfolder (but on a different server than the main server)?

 

Best regards, Anders

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Hi Anders,

I haven't done this specifically for Dynamicweb in a subfolder yet. I suspect that it would be error prone and take a while to get it working successfully. Having it in the root of the site would be ideal. But, it should be technically possible to achieve if you really need to.

Thanks,

Scott 

 

You must be logged in to post in the forum