m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/nginx.md
blob: 5f31206c5fd4cf7f07c083061100b9b24e7e4a3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# The Nginx HTTP server

## Check config syntax

    nginx -t

## Logs

Specify separate logging file for given server

    access_log /var/log/nginx/blog/access.log;

To set up rotating/compressed logs, use `logrotate`. Config in
`/etc/logrotate.d/nginx`. Run the following to reload config:

    logrotate -v -f /etc/logrotate.d/nginx

## Enable website

    ln -s /etc/nginx/sites-available/<config> /etc/nginx/sites-enabled/

## SSL Certificate

    certbot --nginx