Improve README
This commit is contained in:
parent
5ca3aed56c
commit
4e6d15ee93
30
README.md
30
README.md
|
@ -22,6 +22,7 @@ The first thing to check is that the `nginx.conf` file contains appropriate valu
|
||||||
your specific install.
|
your specific install.
|
||||||
|
|
||||||
Most specific variables are:
|
Most specific variables are:
|
||||||
|
|
||||||
* `user`
|
* `user`
|
||||||
* `error_log`
|
* `error_log`
|
||||||
* `pid`
|
* `pid`
|
||||||
|
@ -30,29 +31,32 @@ Most specific variables are:
|
||||||
### Nginx test and restart
|
### Nginx test and restart
|
||||||
|
|
||||||
* To verify Nginx config
|
* To verify Nginx config
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ nginx -t
|
nginx -t
|
||||||
```
|
```
|
||||||
|
|
||||||
* To verify Nginx config with a custom file
|
* To verify Nginx config with a custom file
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ nginx -t -c nginx.conf
|
nginx -t -c nginx.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
* To reload Nginx and apply new config
|
* To reload Nginx and apply new config
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ nginx -s reload
|
nginx -s reload
|
||||||
```
|
```
|
||||||
|
|
||||||
### Basic structure
|
### Basic structure
|
||||||
|
|
||||||
This repository has the following structure:
|
This repository has the following structure:
|
||||||
|
|
||||||
```
|
```text
|
||||||
./
|
./
|
||||||
├── conf.d/
|
├── conf.d/
|
||||||
│ ├── default.conf
|
│ ├── default.conf
|
||||||
│ └── templates/
|
│ └── templates/
|
||||||
├── h5bp/
|
├── h5bp/
|
||||||
│ ├── basic.conf
|
│ ├── basic.conf
|
||||||
│ ├── location/
|
│ ├── location/
|
||||||
|
@ -94,7 +98,6 @@ This repository has the following structure:
|
||||||
Files in this folder contain one or more `location` directives. They are intended
|
Files in this folder contain one or more `location` directives. They are intended
|
||||||
to be loaded in the `server` context (or, in a nested `location` block).
|
to be loaded in the `server` context (or, in a nested `location` block).
|
||||||
|
|
||||||
|
|
||||||
* **`mime.types`**
|
* **`mime.types`**
|
||||||
|
|
||||||
The mime.types file is responsible for mapping file extensions to mime types.
|
The mime.types file is responsible for mapping file extensions to mime types.
|
||||||
|
@ -131,27 +134,30 @@ nginx
|
||||||
### Manage sites
|
### Manage sites
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cd /etc/nginx/conf.d
|
cd /etc/nginx/conf.d
|
||||||
```
|
```
|
||||||
|
|
||||||
* Creating a new site
|
* Creating a new site
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cp templates/example.com.conf .actual-hostname.conf
|
cp templates/example.com.conf .actual-hostname.conf
|
||||||
$ sed -i 's/example.com/actual-hostname/g' .actual-hostname.conf
|
sed -i 's/example.com/actual-hostname/g' .actual-hostname.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
* Enabling a site
|
* Enabling a site
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ mv .actual-hostname.conf actual-hostname.conf
|
mv .actual-hostname.conf actual-hostname.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
* Disabling a site
|
* Disabling a site
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ mv actual-hostname.conf .actual-hostname.conf
|
mv actual-hostname.conf .actual-hostname.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ nginx -s reload
|
nginx -s reload
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue