nginx: what is the equivalent to a2enmod?

I am switching from Apache2 to nginx.

What is the equivalent of these commands in nginx world?

sudo a2enmod ssl
sudo a2enmod rewrite
sudo a2enmod headers 
sudo a2enmod expires 
sudo a2enmod php5

many thanks,


There's no equivalent, as Nginx modules are selected at compile time. The referenced Nginx docs will show the standard modules. Running nginx -V will show the compile options. For example:

$ nginx -V
nginx version: nginx/0.7.61
built by gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
configure arguments: --prefix=/usr/local --sbin-path=/usr/local/sbin --conf-path=/etc/nginx/nginx.conf --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-http_flv_module --with-http_ssl_module --with-http_stub_status_module

As a side note, a2enmod is a Debian/Ubuntu-ism; other Linux distros will enable Apache modules in different ways.