0

I am trying to install nginx as a backend proxy for Apache and I get this errors:

=== Install Nginx from official repositories ===
Loaded plugins: fastestmirror, remove-with-leaves, tsflags, universal-hooks
nginx                                                                                                                                                                                                                  | 2.9 kB  00:00:00
Loading mirror speeds from cached hostfile
 * EA4: 85.13.201.2
 * base: mirror0.babylon.network
 * elrepo: elrepo.reloumirrors.net
 * epel: mirror0.babylon.network
 * extras: mirror0.babylon.network
 * ius: mirror.amsiohosting.net
 * updates: mirror0.babylon.network
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 1:1.8.1-1.el7.ngx will be installed
--> Processing Conflict: ea-apache24-2.4.18-1.1.x86_64 conflicts webserver
--> Finished Dependency Resolution
Error: ea-apache24 conflicts with 1:nginx-1.8.1-1.el7.ngx.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

I also tried the --skip-broken it does not helps I get this:

root@panel [/]# yum install nginx --skip-broken
Loaded plugins: fastestmirror, remove-with-leaves, tsflags, universal-hooks
Loading mirror speeds from cached hostfile
 * EA4: 85.13.201.2
 * base: mirror0.babylon.network
 * elrepo: elrepo.reloumirrors.net
 * epel: mirror0.babylon.network
 * extras: mirror0.babylon.network
 * ius: mirror.amsiohosting.net
 * updates: mirror0.babylon.network
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 1:1.8.1-1.el7.ngx will be installed
--> Processing Conflict: ea-apache24-2.4.18-1.1.x86_64 conflicts webserver

Any help is welcomed. Running CentOS 7.

1

Provides: tags have nothing to do with the ea-apache24-2.4.18-1.1.x86_64 conflicts webserver problem. The package ea-apache24 has a Conflicts: webserver tag which causes this. Which I think is not really clever, as by default nearly all webservers can be installed in parallel. And not sure why you installed apache from some external repo when you can have the same without such issues from base CentOS repositories.

  • This is a version provided from cPanel, I am undergoing with them to solve this, since it seems it is a bug. – Uhl Hosting Feb 3 '16 at 7:36
  • Well there's your problem, you're using cpanel. What you have can no longer be called CentOS. Please remove the CentOS tag from this question. – carlwgeorge Mar 16 '16 at 4:46
  • @carlwgeorge How is it not CentOS – Duncan X Simpson Jun 26 '16 at 22:09
  • @VirtualDXS because obviously this problem doesn't exist with a vanilla CentOS install, only with this specially customized cPanel distro/packages, so the CentOS tag might be misleading, and should be replaced by /cpanel or so. – doktor5000 Jul 27 '16 at 14:13
0

In your situation, I'd build nginx from source.

This has the advantage that you can enable only the features you'll need to run as a proxy.

There are disadvantages. Keeping up with security issues becomes your responsibility, so you'll have to keep track of nginx errata. Also, you'll have to hand-roll init/systemd start scripts (although you can rip those from the RPM and modify them as needed).

If you want to keep the ability to manage it via a package manager, you can always package it as an RPM. There is plenty of documentation around the 'net for doing this, and it'd let you build it on a different machine in case your server lacks a dev environment.

BTW, you probably already know this, but Apache has proxy capability as well. Going 100% Apache (or nginx for that matter) might be an option.

  • yes this would be the only thing what is left for me, compiling it by myself. So it seems. – Uhl Hosting Feb 2 '16 at 5:13
0

It is absolutely not possible to override that. As a note, never attempt --skip-broken.

The problem is that ea-apache24 explicitly conflicts with "webserver". Both httpd and nginx provide " webserver". Because of this, nginx refuses to install. There is no way around this without doing an rpm --force. But there is a good chance that will also fail.

Doing this will create an rpmdb hell. I would advise against that and remove ea-apache24 and then install nginx.

  • this is not a resolution for me, while I need apache main, and nginx as proxy. – Uhl Hosting Feb 2 '16 at 2:28
  • It's not a resolution because you are refusing to understand that you are doing something blatantly unsupported and will inevitably break your machine further. Food for thought: Get your system reinstalled with CentOS 7 and install "httpd" and "nginx" and they will go together without much fuss. # rpm -qa | egrep 'httpd|nginx' nginx-filesystem-1.6.3-8.el7.noarch httpd-tools-2.4.6-40.el7.centos.x86_64 nginx-1.6.3-8.el7.x86_64 httpd-2.4.6-40.el7.centos.x86_64 – Sokel Feb 2 '16 at 3:06
  • Runing nginx as a proxy for Apache is not something bad :) – Uhl Hosting Feb 2 '16 at 4:59
  • This is definitely rpm's dependency system at fault -- "provides: webserver" should not be a blocking conflict. – Shadur Feb 2 '16 at 5:32
  • Nowhere did I say it was a bad thing. People do tomcat and apache as a reverse proxy all the time. This is fine. The problem is because of the RPM's provides, it will NOT let you install those two packages together. @Shadur, this is the complete fault of the RPM builder. CentOS packages do not do "Provides: webserver". Those WILL cause RPM's from installing. – Sokel Feb 2 '16 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.