How to set Nexus feed and src URL to https - nexus

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

Related

Alfresco unable to connect to server http://mydomain:8080/alfresco

i am running alfresco on linux server i am able to access the files from back end but when running http://mydomain:8080/ it gives the following error
Unable to connect
Firefox can’t establish a connection to the server at mydomain:8080.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
tomcat is running but i still cant figure out what could be the cause of the error.
Could you take a look to a tomcat logs?. Maybe you can find more information about the issue.
Could you check compatibility of your amps files with Alfresco version?
Regards,
clv
First, try to hit the Alfresco webapp from the local server itself using curl, like:
curl -v -uadmin http://localhost:8080/alfresco
And see what comes back. If you get a 200 or a redirect, try Share next, like:
curl -v http://localhost:8080/share
If you get a 200 or a redirect then both web applications are working fine and this is due to a network connectivity problem between your client machine and the server or a firewall issue.
If curl cannot hit one of the web applications locally, you should inspect the logs ($TOMCAT_HOME/logs/catalina.out) to figure out why.
You can also "ps -ef|grep tomcat" to make sure Tomcat is actually running, and you can "netstat -atnp|grep 8080" to make sure Tomcat is listening on the port you think it is.
If all of the firewall and networking tests are fine and the logs have no clues, uninstall the AMPs one-by-one until it starts working again.

redirect plumber api to https

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

I am not not able run an website in localhost

This site can’t provide a secure connection localhost sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR
When running a service or site locally you can avoid this problem by doing the following:
In project properties enable SSL:
Make sure to put https link as a start URL or just make direct request to https version:

ngrok - Get all routes to localhost server

I'm using ngrok (free account) in my localhost for my coded web server written in Go
In Ubuntu, after starting my server (which listens on port 3000), I run this command to start ngrok:
./ngrok http 3000
Then other PC can get access to my demo web by path provided by ngrok, for instance, http://6fed323a.ngrok.io
But when they do something on it (for example, click on a button that redirects), the host of URL becomes localhost again
There isn't any functions of ngrok that allows access to all routes in server, is there? I'm learning
I just ran into this issue, the reason for this is because your button uses a straight absolute path redirect which ngrok (or any tunneling service ive used so far) cannot handle. You need to use a relative path redirect such as:
window.location.href = '/path';
In general, it is considered best practice to always use relative urls so that the app is not bound to the hostname. Of course, this is in an ideal work- most legacy apps may not follow this unfortunately.
While I was working on a Rails app I wanted to run it on ngrok but I got error below:
The connection to http://xxxxxx.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:3000.
It seems like ngrok works fine but my local server is not. Which is true since I forgot to run my rails app first by run $ rails s. By doing so I was able to get ngrok tunneing works fine.
Make sure your local server run first.
I have noticed ngrok url changes to localhost url when I click on site logo which is defined as root_path in my route file. But other links and header tabs for example works fine and shows ngrok url.
Good luck.

Yum client configuration: How to use basic authentication with a port other than 80?

I've run into an issue configuring a Yum repository which I'm serving up with HTTP/Apache.
I want to use http basic authentication, and set the listening port to something other than 80, because this repo is in my DMZ. I was trying to do that by setting up my baseurl as follows (from my repo file):
baseurl=http://user:password#<my-ip>:<my-non-80-port>/yum/RHEL/7/base/$basearch/
The documentation for yum.conf indicates you can do basic http authentication by adding the username/password to the URL as I did above. I get the following error when I try to do a yum search mysql from a client:
[Errno 14] HTTP Error 401: Authorization Required
This indicated to me that the extra ":" specifying the port was confusing yum's parsing of my url. I removed the port, set the server back to port 80, and it works.
So it appears you cannot do basic http authentication AND change the port number that the web server listens on. I noticed that there are username and password directives in newer version of Yum, but my version doesn't appear to have this directives (I am running yum-3.2.22-37.0.1.el5). Is there any workaround for this?
I worked around this by turning off plugins by adding the following line to my yum configuration.
plugins=0
I think the workaround worked because the base yum updater was working fine with the authorization information from baseurl, but some of the plugins (such as the fastmirror plugin) didn't remember the authorization properly. So the behaviour I had without plugins enabled is that initially an update would work, then subsequently it would start to fail with the authorization error in the question. Once I disabled plugins, everything started to work fine.

Resources