Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doest this work with nginx version: nginx/1.22.1? Not able to run ./confugure commnd #144

Open
alokkumar0009 opened this issue Dec 24, 2023 · 3 comments

Comments

@alokkumar0009
Copy link

Nginx is already running as a proxy server for me and as per new requirement I am trying to use this module. But as per instruction I am not able to run ./configue command it says bash: ./configure: No such file or directory.

Not sure If I can use the module with my nginx version, which is already instaled and serving us since 3 years?

Any help would be appreciated.

Thanks

@hawicz
Copy link

hawicz commented Dec 24, 2023

You need a copy of the nginx sources, simply having the installed binary isn't going to cut it. If you don't know how the version you have was originally built be sure to test carefully to make sure you don't lose sone other customizations with a new build. Running nginx -V (that's with a capital vee) should get you started with configure options that may have been used before.

@alokkumar0009
Copy link
Author

alokkumar0009 commented Dec 25, 2023

Thank for response

nginx -V gives me below:

[root@ip-10-XX-XX-XX ec2-user]# nginx -V
nginx version: nginx/1.22.1
built by gcc 7.3.1 20180712 (Red Hat 7.3.1-17) (GCC)
built with OpenSSL 1.1.1g FIPS 21 Apr 2020
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf.......................

What do you mean by copy of the nginx sources? thanks for reply.

@crpb
Copy link

crpb commented Jan 11, 2025

fwiw and anyone who also fails on this part. this is my workflow for installing it with Debian but you would only need to replace the apt calls with the apropiate way for redhat/smth i guess like this yum install yum-utils ; yumdownloader --source nginx; yum; yum-builddep nginx + extracting maybe 🤷🏼

mkdir -p ~/src/nginx/spnego/
cd $_
git clone https://github.com/stnoonan/spnego-http-auth-nginx-module.git
git -C spnego-http-auth-nginx-module checkout v1.1.2
apt-get build-dep -y nginx
apt-get source nginx
cd nginx-*/
OPTS="$(echo $(nginx -V |& grep configure\ arguments |sed 's/.*prefix/--prefix/') --add-dynamic-module=../spnego-http-auth-nginx-module)"
./configure $OPTS
make modules
LIBDIR=/usr/local/lib/nginx/modules
mkdir -p $LIBDIR
cp objs/ngx_http_auth_spnego_module.so $LIBDIR/
echo "load_module /usr/local/lib/nginx/modules/ngx_http_auth_spnego_module.so;" > /etc/nginx/modules-available/90-mod-http-auth-spnego.conf
ln -s /etc/nginx/modules-available/90-mod-http-auth-spnego.conf /etc/nginx/modules-enabled/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants