1. nginx_ensite(8)
  2. nginx_ensite(8)


nginx_ensite - enable/disable an nginx site/virtual host


nginx_ensite [ site ]...
nginx_dissite [ site ]...


This manual page documents briefly the nginx_ensite and nginx_dissite commands.

nginx_ensite is a script that enables the specified site which is included in a http block within the nginx configuration. It does this by creating symlinks within /etc/nginx/sites-enabled.

Likewise, nginx_dissite disables a site by removing those symlinks. It is not an error to enable a site which is already enabled, or to disable one which is already disabled.

The default site is handled specially: the resulting symlink will be called 000-default in order to be listed first. Note that listing — as done by ls — orders the files lexicographically. Nginx loads the files by the OS provided order. To make sure a specific server configuration is loaded first specify the default_server parameter on the listen directive of that server configuration.


Enable the default site:

nginx_ensite 000-default

Disable the default site:

nginx_dissite 000-default

Enable the example.org site:

nginx_ensite example.org    


Directory with files providing information on available sites.

Directory with links to the files in sites-available for enabled sites.


a2ensite(8), a2dissite(8), nginx(1)

nginx_ensite is Copyright (C) 2010-2011 Antonio P. P. Almeida <appa@perusio.net> under the terms of a MIT license.


The latest version of nginx_ensite is available from: https://github.com/perusio/nginx_ensite.


nginx_ensite was written by Antonio P. P. Almeida <appa@perusio.net> that also wrote the manual page based on the a2ensite manual page by Stefan Fritsch <sf@debian.org> for the Debian GNU/Linux distribution.

  1. August 2011
  2. nginx_ensite(8)