Jump to content

Recommended Posts

Hi,

We've finally updated to a newer version with the web admin, and would like to make use of it.  We have things like Trac and Jenkins running on this server also.

Each one of these, as with Plastic, has their own inbuilt web server, so instead of having a myriad of ports open we instead use IIS to front them all and rewrite the URLs.  This works fine for both Trac and Jenkins, as they have options that let you specify exactly what the external URL of the system looks like.

I've not found a similar option for Plastic however, so when we attempt to access the box via, eg http://our.server/plastic, it successfully responds with the 302 to take us to the login page, but because it's unaware that it was not the root of the website, that 302 sends us to http://our.server/account.  Similarly if I attempt to directly open http://our.server/plastic/account, the page doesn't render properly as all the other resources requested after the initial page load are all requested from the root of the website, rather than relative to the page.

I could probably fix this with further rules in IIS to modify the responses to take this into account, but I'm wondering if there's a simple option I'm overlooking that would let me just put in the root url into the config somewhere, in the same way other tools can.  I've tried modifying the "override host name" option on the Network configuration in web admin, but it doesn't appear to apply to this.

Cheers,

James

Share this post


Link to post
Share on other sites

Ok. I just had another go on this and managed to get it running 😃

Make sure you have IIS10 + AAR + Url Rewrite

1. Make sure you disable "Reverse rewrite host in respose headers" in "Application Request Routing Cache" -> "Server Proxy Settings..." (Server setting!!)

2. Create a new WebSite (if not already done)

3. Add a new application to the site (in my case the application is called 'plastic')

4. copy the attached web.config to the root folder of the web application

5. change all rules to the servernames and ports you are using

[PLASTICSERVER] is the name of the server that runs plastic scm.

[WEBSERVER] is the name of the web server.

Can be the same, but don't have to.

 

DONE ❤️

web.config

Share this post


Link to post
Share on other sites

Glad you got it working!

Since I posted this, we've started building a new dev server.  Like our old one, it's hosted in AWS.  However to "fix" this problem (more like work around it entirely), I've used AWS target groups and a load balancer, coupled with subdomains of the server domain.  Now we have eg https://plasticadmin.server.ourdomain and https://jenkins.server.ourdomain set up in Route 53 pointing at the load balancer, and the load balancer listener rules and target groups take care of routing to the right http port on the server.  It doesn't load balance anything since there's only 1 server behind it, but it makes this stuff trivial :) 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...