The ConnectWise Control forum has moved to ConnectWise University! This forum has been locked and is in read-only mode. Click here for instructions on how to access the new forum.

Welcome Guest! You can not login or register.



Go to last post Go to first unread
#1 Posted : Tuesday, September 11, 2018 9:14:03 PM(UTC)

Rank: Guest

Joined: 9/11/2018(UTC)
Posts: 3

Hi Peeps

Recently moved to using NGINX in front of Screenconnect in order to provide SSL.

We're on a Plesk server, which manages the Cert through LetsEncrypt, and also handles all the necessary redirect / rewrite stuff that would normally be required in the NGINX.Conf. The problem is that our root URI gives a 404 error from the Screenconnect web server, saying index.html does not exist.

Weird thing is, the system seems to be working OK, but only if you navigate directly to a URI such as https://control.mydomain...#Support/All%20Sessions/

It's just if you try to access https://control.mydomain.co.uk/ you get:

The resource cannot be found.
Description: HTTP 404.The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Details: Requested URL: /index.html

Exception stack trace:
at System.Web.StaticFileHandler.ProcessRequest (System.Web.HttpContext context) [0x00000] in <filename unknown>:0
at System.Web.DefaultHttpHandler.BeginProcessRequest (System.Web.HttpContext context, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0
at System.Web.HttpApplication+<Pipeline>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0
at System.Web.HttpApplication.Tick () [0x00000] in <filename unknown>:0
Version Information: 3.0.4 (master/c728710 Thu Jan 24 18:46:01 EST 2013); ASP.NET Version: 4.0.30319.17020

Here is my NGINX config:

location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_max_temp_file_size 0;
client_max_body_size 50m;
client_body_buffer_size 256k;
proxy_connect_timeout 180;
proxy_send_timeout 180;
proxy_read_timeout 90;
proxy_buffer_size 16k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;

I've also tweaked web.config as below:

<add key="WebServerListenUri" value="">
<add key="WebServerAddressableUri" value="https://control.mydomain.co.uk">

Any ideas?

#2 Posted : Tuesday, September 11, 2018 10:48:26 PM(UTC)

Rank: Guest

Joined: 9/11/2018(UTC)
Posts: 3

Additional info - There is a default index.html file which Plesk creates, in the webroot that NGINX would otherwise be serving if the proxy_pass directive was not there. If I delete this index.html file, the error changes to an NGINX Permission Denied error.

It's as if NGINX is trying to server index.html from the proxy_pass location, which will fail of course. Not sure how to get around this.
#3 Posted : Tuesday, September 11, 2018 10:52:56 PM(UTC)

Rank: Guest

Joined: 9/11/2018(UTC)
Posts: 3

Sorted! For anyone else who hits this problem with Plesk... Turn off PHP support on the domain / subdomain you are using.

I guess having PHP switched on adds a level of confusion which is not needed here.
#4 Posted : Sunday, October 21, 2018 6:49:41 PM(UTC)

Rank: Member

Joined: 10/22/2015(UTC)
Posts: 31
United States

Thanks: 1 times
Thanks for sharing.

Unless I'm mistaken, you can't run everything on port 443 (same IP) with CWC installed on a Linux server, can you? When I say everything I mean the web/login page and the actual remote control traffic all running on port 443. There is way to do this with CWC installed on a Windows server. Also, there appears to be a way (on Windows only) to have CWC listen for traffic on a specific folder (e.g., https://www.mysite.com/remote/), only. Do you or anyone else know if this can be done on Linux, yet?

I would like to keep everything on port 443 (preferably the same IP) because it seems to be easier to get through firewalls. Can this be done with two different IP's on Linux with NGINX proxy? If this can be done on Linux with two IP's, does it also require two commercial SSL certs?

Edited by user Sunday, October 21, 2018 7:05:39 PM(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.