Add doc files for sites-enabled|available

This commit is contained in:
AD7six 2014-10-23 16:18:38 +00:00
parent a873a55be7
commit e8113fa555
2 changed files with 56 additions and 0 deletions

17
doc/sites-available.md Normal file
View File

@ -0,0 +1,17 @@
[Nginx Server Configs homepage](https://github.com/h5bp/server-configs-nginx)
| [Documentation table of contents](TOC.md)
# Sites available
Files in this folder are not referenced/loaded automatically. The intended
purpose of this folder is to contain all server config files whether they
are currently in use or not.
So, for example this folder may contain:
example.com
example.com-original
otherdomain.com
newproject.com
Where each file contains the server block(s) specific to that project.

39
doc/sites-enabled.md Normal file
View File

@ -0,0 +1,39 @@
[Nginx Server Configs homepage](https://github.com/h5bp/server-configs-nginx)
| [Documentation table of contents](TOC.md)
# Sites enabled
Files in this folder **are** loaded automatically. The intended purpose of
this folder is to contain symlinks to the folder `sites-available`.
## Enabling a new site
To enable a new site, link the config file to sites-enabled, and restart nginx.
For example:
$ cd /etc/nginx/sites-available
... create newproject.com ...
$ cd /etc/nginx/sites-enabled
$ ln -s ../sites-available/newproject.com .
$ /etc/init.d/nginx reload
[....] Reloading nginx configuration: nginx.
$
## Disabling a site
To disable a site, remove the symlink from the sites-enabled folder, and restart
nginx.
For example:
$ cd /etc/nginx/sites-enabled
$ rm newproject.com
$ /etc/init.d/nginx reload
[....] Reloading nginx configuration: nginx.
$