Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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,

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.