Debian Tutorials

Debian Tutorials


Step by step tutorials showing you how to install and configure various applications and services on Debian based Linux distros.

June 2021
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  

Categories


Installing nginx from source with mail support

Ástþór IPÁstþór IP

nginxnginx is a lightweight, high performance web server/reverse proxy and e-mail (SMTP/IMAP/POP3) proxy.

1. Install required packages

apt-get install build-essential autotools-dev debhelper libpcre3-dev zlib1g-dev libssl-dev

2. Receive the nginx source

apt-get source nginx

3. Enable the mail modules

cd nginx-x.x.x
pico debian/rules

Replace nginx-x.x.x with the correct folder created.

Add “–with-mail –with-mail_ssl_module” to the line starting with ./configure so that it looks something like this:

./configure $(CONFIGURE_OPTS) --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug --with-http_stub_status_module --with-http_flv_module --with-http_ssl_module --with-http_dav_module --with-mail --with-mail_ssl_module

4. Build the package

dpkg-buildpackage

5. Install the new nginx package

dpkg -i ../nginx_x.x.x-x.deb

Replace nginx_x.x.x-x.deb with the correct version and platform. In my case the filename is: nginx_0.6.32-3+lenny3_amd64.deb

6. Configure nginx

Next step is to configure the nginx rules. That’s outside the scope of this tutorial.

Comments 0
There are currently no comments.