Error: Unknown repo: 'nginx'

Started by anandmys, November 05, 2026, 05:21:00 AM

Previous topic - Next topic

anandmys

Few months back when I was using Nginx & Varnish & Apache option, websites suddenly went down.

So I used Apache only option.

After the recent updates, I tried rebuilding Nginx & Varnish & Apache option

I got the error

Nginx could not be installed, nothing was changed.
Error: Unknown repo: 'nginx'


overseer

What do you have for / etc / yum.repos.d / nginx.repo ?
[nginx-mainline]
name=Nginx repo
baseurl=https://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

anandmys

[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

overseer

When I last looked at your server, there was a syntax error in your nginx vhost conf files that was preventing nginx from starting. It pertained to the bytes log format. I commented out those lines in your vhost configs and nginx started up properly.

I can take another look if you want to PM your updated server details to me.

anandmys


djprmf

The error doesn't looks like a issue with configuration. Is a repo issue - probably from a old or corrupted repo in the configuration files.

What is the OS?