NGINX: Difference between revisions
From Lolly's Wiki
Jump to navigationJump to search
m (Text replacement - "<source" to "<syntaxhighlight") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[ | [[Category:Webserver]] | ||
==Add module to nginx on Ubuntu== | ==Add module to nginx on Ubuntu== | ||
For example http-auth-ldap: | For example http-auth-ldap: |
Latest revision as of 11:16, 2 December 2021
Add module to nginx on Ubuntu
For example http-auth-ldap:
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/