m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/nginx.md
blob: ae274d5125e159791316d96a11ca439f4542221e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 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/