NGINX: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
(Die Seite wurde neu angelegt: „Kategorie:NGINX ==Add module to nginx on Ubuntu== For example http-auth-ldap: <source lang=bash> mkdir /opt/src cd /opt/src apt source nginx cd nginx-* e…“)
 
m (Text replacement - "</source" to "</syntaxhighlight")
Line 29: Line 29:
make modules
make modules
sudo install --mode=0644 --owner=root --group=root objs/ngx_http_auth_ldap_module.so /usr/lib/nginx/modules/
sudo install --mode=0644 --owner=root --group=root objs/ngx_http_auth_ldap_module.so /usr/lib/nginx/modules/
</source>
</syntaxhighlight>

Revision as of 15:35, 25 November 2021

Kategorie:NGINX

Add module to nginx on Ubuntu

For example http-auth-ldap: <source lang=bash> mkdir /opt/src cd /opt/src apt source nginx cd nginx-*

export HTTPS_PROXY=<your proxy server> git clone https://github.com/kvspb/nginx-auth-ldap.git debian/modules/http-auth-ldap

./configure \

 --with-cc-opt="$(dpkg-buildflags --get CFLAGS) -fPIC $(dpkg-buildflags --get CPPFLAGS)" \
 --with-ld-opt="$(dpkg-buildflags --get LDFLAGS) -fPIC" \
 --prefix=/usr/share/nginx \
 --conf-path=/etc/nginx/nginx.conf \
 --http-log-path=/var/log/nginx/access.log \
 --error-log-path=/var/log/nginx/error.log \
 --lock-path=/var/lock/nginx.lock \
 --pid-path=/run/nginx.pid \
 --modules-path=/usr/lib/nginx/modules \
 --with-http_v2_module \
 --with-threads \
 --without-http_gzip_module \
 --add-dynamic-module=debian/modules/http-auth-ldap

make modules sudo install --mode=0644 --owner=root --group=root objs/ngx_http_auth_ldap_module.so /usr/lib/nginx/modules/ </syntaxhighlight>