Nginx a pain on Fedora 33 while installing dynamic modules

Hopefully this is the right forum here.

I’m moving from CentOS 7 and 8…now that Red Hat is stopping support for CentOS it’s time to evaluate another platform. Fedora seems pretty similar with yum and dnf etc all pretty similar. Same family.

But I find some specific aspects like Nginx are proving to be hideously difficult. I want to install nginx from the main epel/nginx repo, which goes fine. Just a simple dnf install nginx installs the version 1.18.0, which is great:

# nginx -v

nginx version: nginx/1.18.0

The challenges begin when we want to install dynamic modules. The usual process is to download the same nginx as the one installed in the system, and compile modules in there. So I download nginx into a /usr/src/ folder. When I compile the modules there:

./configure $(nginx -V) \
     --with-compat \
        --add-dynamic-module=../ngx_brotli                      \
        --add-dynamic-module=../headers-more-nginx-module       \
        --add-dynamic-module=../ngx_security_headers            \

This works fine. The modules are made, and I copy them into the respective places. But when reloading nginx I see this error:

# nginx -t

nginx: [emerg] module "/usr/share/nginx/modules/ngx_http_security_headers_module.so" is not binary compatible in /etc/nginx/nginx.conf:16

nginx: configuration file /etc/nginx/nginx.conf test failed

This error suggests the checksum of the nginx folder on the system and the one I downloaded with the same version number is incorrect. I have followed the exact same process on a CentOS 8 box, which in fact installs nginx 1.16.1 but even if I manually force-install 1.18.0 there and then compile modules accordingly, this entire process works just fine for both versions.

What do I need to do on Fedora 33? Welcome any pointers.

2 Likes

Have you figured this out? Seems like NGINX just isn’t welcome on Fedora 33. Here’s my experience in the CLI w/ NGINX configuration:
"[root@ip-172-31-18-209 nginx]# nano nginx.conf
[root@ip-172-31-18-209 nginx]# mkdir -p /usr/share/nginx/cache/fcgi
[root@ip-172-31-18-209 nginx]# nginx -t
nginx: [emerg] getpwnam(“www-data”) failed in /etc/nginx/nginx.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed
[root@ip-172-31-18-209 nginx]# systemctl start nginx
[root@ip-172-31-18-209 nginx]# systemctl enable nginx
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /usr/lib/systemd/system/nginx.service.
[root@ip-172-31-18-209 nginx]# nginx -t
nginx: [emerg] getpwnam(“www-data”) failed in /etc/nginx/nginx.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed
[root@ip-172-31-18-209 nginx]# systemctl reload nginx
[root@ip-172-31-18-209 nginx]# nginx -t
nginx: [emerg] getpwnam(“www-data”) failed in /etc/nginx/nginx.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed
[root@ip-172-31-18-209 nginx]#
"