Permalink
Browse files

Adding documentation for Nginx functions.

  • Loading branch information...
1 parent e254a98 commit e52e0dd0c4e7290a3e532e41868e226f74500ace @mlavin committed Aug 3, 2012
Showing with 32 additions and 0 deletions.
  1. +1 −0 docs/index.rst
  2. +31 −0 docs/nginx.rst
View
@@ -14,6 +14,7 @@ Contents
motivation.rst
base.rst
system.rst
+ nginx.rst
settings.rst
changelog.rst
View
@@ -0,0 +1,31 @@
+Nginx Functions
+======================================
+
+Nginx is an awesome webserver and these are functions to help manage site
+configurations.
+
+
+.. function:: remove_default_site()
+
+ Nginx installs with a default server listening on 80 defined in
+ ``/etc/nginx/sites-enabled/default.conf``. This task removes that configuration.
+
+
+.. function:: upload_nginx_site_conf(site_name, template_name=None, context=None, enable=True)
+
+ This task uploads a new configuration to ``/etc/nginx/sites-available/<site_name>``. This
+ looks for a template named ``nginx/<site_name>.conf`` and if not found uploads the default
+ ``nginx/site.conf`` unless ``template_name`` is given. By default this site configuration
+ will be enabled ``/etc/nginx/sites-enabled/``.
+
+
+.. function:: enable_site(site_name)
+
+ Enables a site in ``/etc/nginx/sites-available/<site_name>`` and links it to
+ ``/etc/nginx/sites-enabled/<site_name>``.
+
+
+.. function:: disable_site(site_name)
+
+ Disables a site in ``/etc/nginx/sites-enabled/`` by the name. The configuration in
+ ``/etc/nginx/sites-available/`` is not touched.

0 comments on commit e52e0dd

Please sign in to comment.