~jeffa/old-jeffa.io

ref: b3b87a4bc53e647fb00b636c22baa7b1fbc90b92 old-jeffa.io/nginx.conf -rw-r--r-- 1.4 KiB
b3b87a4bJeff Anderson Update homepage; Remove recommended.md 1 year, 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
user jeffa.io-nginx;
error_log /jeffa.io/logs/error.log;
pid /jeffa.io/logs/nginx.pid;

events {}

http {
    include /etc/nginx/mime.types;

    keepalive_timeout 65;

    log_format main '$remote_addr - $remote_user [$time_local]  $status '
                    '"$request" $body_bytes_sent "$http_referer" '
                    '"$http_user_agent" "$http_x_forwarded_for"';
    access_log /jeffa.io/logs/access.log  main;

    server {
        listen 80;

        server_name jeffa.io www.jeffa.io;

        access_log /jeffa.io/logs/jeffa.io.access.log  main;

        gzip on;
        gzip_types text/css image/png;
        gzip_proxied no-cache no-store private expired auth;
        gzip_min_length 1000;

        root /jeffa.io/client/build/;
        index  index.html index.htm;

        location / {
            try_files $uri $uri.html $uri/ 404;
            gzip_static on;

            add_header Cache-Control private;
            expires modified 0;
        }

        error_page  404 /404.txt;
        location /404.txt {
            add_header Content-Type text/plain;
            return 404 "404 - Resource not found. If this site sent you here, please let me know.";
        }

        error_page   500 502 503 504  /50x.txt;
        location /50x.txt {
            add_header Content-Type text/plain;
            return 500 "Internal server error.";
        }
    }
}