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…“)
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Kategorie:NGINX]]
[[Category:Webserver]]
 
==Add module to nginx on Ubuntu==
==Add module to nginx on Ubuntu==
For example http-auth-ldap:
For example http-auth-ldap:
<source lang=bash>
<syntaxhighlight lang=bash>
mkdir /opt/src
mkdir /opt/src
cd /opt/src
cd /opt/src
Line 29: Line 28:
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>

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/