Installing NGINX on RHEL8

Please use this template for troubleshooting questions.

My issue:

We are upgrading some ec2 instances that are currently running RHEL 7 to RHEL 8. We have no issues installing nginx on RHEL 7. However when we try to run:

dnf install nginx (having created the nginx.repo in /etc/yum.repo.d)

we get a curl 56 error “Connection reset by peer”.

If we directly use Curl ie.

curl http://nginx.org/packages/mainline/rhel/8/x86_64/repodata/repomd.xml

The repomd.xml file is shown without error.

I am a bit lost as to how to sort this issue.

How I encountered the problem: AA

Solutions I’ve tried: As above

Version of NGINX or NGINX adjacent software (e.g. NGINX Gateway Fabric):

Deployment environment: AWS EC2 instance

Minimal NGINX config to reproduce your issue (preferably running on https://tech-playground.com/playgrounds/nginx for ease of debugging, and if not as a code block): (Tip → Run nginx -T to print your entire NGINX config to your terminal.)

NGINX access/error log: (Tip → You can usually find the logs in the /var/log/nginx directory.)

1 Like

It’s probably a typo in the repo file. Worth sharing the file here

1 Like