redirect plumber api to https - r

i have an ubuntu server running a plumber API, which provides a REST interface at http://myserver.com:8080/somecommand. I used systemd to host this (see https://www.rplumber.io/docs/hosting.html#systemd). I need, however, that this communication is done via https.
I managed to issue myself a certificate and https://myserver.com now gives me the apache standard landing page. i have no idea though, how to put plumber behind that. I tried to run the plumber api on port 443, but the connection was refused. I also tried to redirect traffic in the apache configuration, but i only managed to route https://myserver.com/somecommand to http://myserver.com:8080/somecommand.
Any hints would be appreciated,
Felix

Related

What are the networking requirements for reverse proxy tunneling on a self hosted vscode-server instance?

I recently moved over from coder/code-server to microsoft's implementation of a code server. Included in this is the ability to set up tunnels to the remote host, however i can't seem to get it to work. I'm using nginx to forward to the code-server service as a reverse proxy which works just fine for the most part. Since the documentation doesn't include a list of networking requirements for hosting a code-server i'd like to know if there are any ports that should be open and forwarded or any additional configuration?
I've configured nginx to forward all requests to the code-server instance, but this isn't enough to get tunnels working. I can connect to it through the domain i'm listening for.

Netlify and ngrok linking

I have a front-end deployed on Netlify and a back-end is deployed on localhost which is exposed using ngrok.
Is it possible to link them so that when I click on the Netlify link, it would send request to my localhost server exposed from ngrok ?
Netify can proxy to a dynamic backend, that is an intended use case. The problem we'll have is using "localhost" - netlify needs a valid hostname to connect to. So, if your ngrok is exposed (not firewalled) at some public IP, you can put that into your redirects configuration:
/backend-stuff-in-this-path/* https://1.2.3.4/:splat 200!
will send all requests to the path /backend-stuff-in-this-path/ANYTHING to the server at 1.2.3.4/ANYTHING
This may not be incredibly useful since your machine will change IP addresses sometimes one presumes, but if you were using localhost anyway, you weren't planning to put it in production quite yet. Note that redirects are deploy-specific, so you do need to redeploy to change the location if your IP changes.

How to set Nexus feed and src URL to https

I am new to this forum and my searches haven't found a solution to my problem.
I am having an issue with Sonatype Nexus v2.11.4-01. This is the OSS version. The repo server is behind a load balancer which is handling all the SSL and redirecting via http to the Nexus server.
I have a windows server using a chocolatey client, v0.9.9.11, configured to use the source: https://repo.agent.company.com/nexus/service/local/nuget/NuGet/
This windows server is on a network that does not allow port 80 traffic in or out. The commands choco list and choco search work correctly. However, when I try to run choco install agent -y, I get an error about not being able to get to the repo.
If I open the following in a browser: https://repo.agent.company.com/nexus/service/local/nuget/NuGet/Packages/
I see in the response:
xml:base="http://repo.agent.company.com/nexus/service/local/nuget/NuGet/"
and
src="http://repos.agent.company.com/nexus/service/local/nuget/NuGet/"
My question is, how do I get the xml:base and src URL's to have https? Wireshark has shown me that the initial communications are done via https, but the download is initiated via http, which seems to match what I am seeing in the Package URL response.
Thank you for helping.
It sounds like there is a reverse proxy of some sort running in front of Nexus?
If so, it has to be configured to set the X-Forwarded-Proto header:
https://help.sonatype.com/display/NXRM2/Installation+and+Running#InstallationandRunning-Example:ReverseProxySSLTerminationatBasePath

How to reverse proxy a TFS server

We're using a TFS server 2017 update 2 in our local office.
But we need access the server at home, we tried to use nginx for build a reverse proxy to access TFS server, but failed.
Also the Apache haven't ability to do that to pass the NTLM authorization of TFS.
Do someone know how to do that?
Both nginx and Apache server can't handle NTLM authentication properly. Even if use "stream" server in nginx, it still throw exceptions at times. So the best way that I've found is to write a pure reverse proxy with socket in NodeJS.
Please try the code here: https://gist.github.com/gekowa/7fdd6fa6db51a7671de5469b3943a9da
The implementation was pretty straightforward, it just double pipe local and remote sockets, and everything is just fine.
node tcpproxy.js 8080 your_internal_server_address your_internal_port
Best choice:your_internal_port=8080

How to keep the session when using nginx as the Reverse Proxy to many servers with unsame project

I am new to Nginx. And I have trobule with it. We have many projects with different language and framework. And they are put in different server. How do I keep the session for every project respectively?
Question is not quite clear but from what i understood i will try to guide you a bit...
Nginx is a web server which when used as reverse proxy basically just sits in front of your project appserver. When some client tries to connect to your appserver, it will first connect to nginx and then nginx will forward that request to you appserver.
eg.
client -Req-> nginx (port 8080) -Req-> appserver(jetty, port 9000)
Now if you are trying to use a single nginx instance and direct request to multiple app servers from nginx. You will either have to make nginx listen on different ports and forward them to different appservers. Or nginx can identify which request is meant for which appserver by routes.
Here is a source which can help you to learn how to configure Nginx to do this... please ask again if you need further help.
https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-14-04-lts

Resources