File tree 2 files changed +56
-0
lines changed
2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ [ Nginx Server Configs homepage] ( https://github.com/h5bp/server-configs-nginx )
2
+ | [ Documentation table of contents] ( TOC.md )
3
+
4
+ # Sites available
5
+
6
+ Files in this folder are not referenced/loaded automatically. The intended
7
+ purpose of this folder is to contain all server config files whether they
8
+ are currently in use or not.
9
+
10
+ So, for example this folder may contain:
11
+
12
+ example.com
13
+ example.com-original
14
+ otherdomain.com
15
+ newproject.com
16
+
17
+ Where each file contains the server block(s) specific to that project.
Original file line number Diff line number Diff line change
1
+ [ Nginx Server Configs homepage] ( https://github.com/h5bp/server-configs-nginx )
2
+ | [ Documentation table of contents] ( TOC.md )
3
+
4
+ # Sites enabled
5
+
6
+ Files in this folder ** are** loaded automatically. The intended purpose of
7
+ this folder is to contain symlinks to the folder ` sites-available ` .
8
+
9
+ ## Enabling a new site
10
+
11
+ To enable a new site, link the config file to sites-enabled, and restart nginx.
12
+
13
+ For example:
14
+
15
+ $ cd /etc/nginx/sites-available
16
+
17
+ ... create newproject.com ...
18
+
19
+ $ cd /etc/nginx/sites-enabled
20
+ $ ln -s ../sites-available/newproject.com .
21
+
22
+ $ /etc/init.d/nginx reload
23
+ [....] Reloading nginx configuration: nginx.
24
+ $
25
+
26
+ ## Disabling a site
27
+
28
+ To disable a site, remove the symlink from the sites-enabled folder, and restart
29
+ nginx.
30
+
31
+ For example:
32
+
33
+ $ cd /etc/nginx/sites-enabled
34
+ $ rm newproject.com
35
+
36
+ $ /etc/init.d/nginx reload
37
+ [....] Reloading nginx configuration: nginx.
38
+ $
39
+
You can’t perform that action at this time.
0 commit comments