Topic: centos 8 and nginx

I am new to CentOS 8 and modules, so this might be something I'm doing incorrectly.

I have always installed nginx directly from rpm's from nginx.org to get the latest version.  I did that by:

- setting up nginx.repo from http://nginx.org/en/linux_packages.html#RHEL-CentOS
- dnf module disable nginx
- dnf install nginx

When I tried running:

dnf module install php:remi-7.3

I got an error:

Error: Problems in request:
broken groups or modules: php:remi-7.3
Modular dependency problems:

 Problem: conflicting requests
  - module php:remi-7.3:20191017112911:00000000-0.x86_64 requires module(nginx:1.14), but none of the providers can be installed
  - module nginx:1.14:8000020191007205758:55190bc5-0.x86_64 is disabled

Do you know of a way around this?

Thank you for your help.

Ryan

Re: centos 8 and nginx

Use nginx from CentOS AppStream

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: centos 8 and nginx

Main benefit from official packages: it works out of the box, as php-fpm drop configuration files in expected location.

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: centos 8 and nginx

I was looking for a way to run the latest nginx 1.16.  It seems AppStream has 1.14.  Just as your packages provide a way to run a later version of php compared to what Red Hat/CentOS provides, I use the nginx packages to do the same and run the latest nginx version.  These rpm's are made by nginx directly.  This has worked for me in CentOS 7.  Is there any way to make this work?  Thanks.

Re: centos 8 and nginx

> Is there any way to make this work?

I will think, but don't see simple way (as php-fpm requires nginx-filesystem not provided upstream)

Probably worth to be reported on nginx about their repository being not compatible with PHP stack in RHEL / CentOS 8

AFAIK, 8.1 will have nginx 1.14 and 1.16 (also php 7.2 and 7.3)

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: centos 8 and nginx

Another way (to be tested) is to use the Software Collection (php73-php-*) which don't have this dependency

See the wizard instructions, using "multiple versions" choice.

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: centos 8 and nginx

BTW, in next build (later this week), I will make the dependency on  nginx-filesystem  weak (Requires to Recommends)
Should workaround this problem.

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: centos 8 and nginx

Please try with new build (7.2.24, 7.3.11, 7.4.0RC4)
Dependency on nginx is now optional

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: centos 8 and nginx

Remi - thank you for making the update to remove the dependency on nginx-filesystem.  I confirmed it works great.  I appreciate your quick response and update.

I also tried your idea of using "multiple versions".  I got it to work, but I ran into a different issue.  I see there's another thread in this forum about libzip, so maybe it's the same issue.

I got the same error as the other thread when trying to install php73-php-pecl-zip, but I think for a different reason.

I realized that because I originally followed the instructions for the single version, I had run "dnf module disable php".

In order to switch to multiple versions, I had to first run "dnf module enable php".  Doing that allowed me to install php73-php-pecl-zip and libzip.

Thanks again for your help.

Ryan