I set up Connect to be accessed via a nginx reverse proxy. This works to access the control panel and content through Connect. But I can not use the proxy address to connect RStudio IDE to the Connect Server. I just get a 'Server Validation failed' error. Using the direct connection over port 3939 would work, but is not suitable for the setup.
Is this a missing feature with RStudio Server or what might be the problem? Not sure how to troubleshoot this as the reverse proxy is totally fine outside of the RStudio IDE
Can you say a bit more about the way you have implemented your reverse proxy? Is it rewriting paths (i.e. hosting Connect at /rsc/)? Is it doing authentication? Can you share the configuration here? Have you seen the doc guidance below?
What is basically happening is that the IDE does a "health check" on the RStudio Connect server, so that request is getting broken somehow. We can probably replicate the request with curl -i (either from your local computer or from the RStudio Server node itself) - the requests themselves will be shown if you execute the following in your R console before publishing:
Ahhh interesting! So that means that the RStudio Server does not trust the RStudio Connect Certificate Authority. Resolving that trust issue will likely resolve the problem! (You want to add the Certificate Authority to the RStudio Server's trust store. I suspect your browser is already configured to trust the CA, which explains why the trust works fine there.)
It's worth noting that you probably need to configure Connect to trust the CA as well! That way things like pins or using the RStudio Connect Server API from Connect will not also run into certificate trust issues.