File: nginx.conf

package info (click to toggle)
python-certbot 5.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 9,660 kB
  • sloc: python: 44,312; sh: 2,380; makefile: 480
file content (39 lines) | stat: -rw-r--r-- 1,124 bytes parent folder | download | duplicates (2)
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
server {
    server_name wiki.example.com;
    root /srv/www/pmwiki/example.com/wiki/public;

    index pmwiki.php;

    location ~ ^/(cookbook|local|scripts|wiki.d|wikilib.d) {
        deny all;
    }

    location / {
        try_files $uri $uri/ @pmwiki;
    }

    location @pmwiki {
        rewrite ^/(.*) /pmwiki.php?n=$1;
    }

    ## php configuration using unix sockets.
    location ~ \.php$ {
        include /etc/nginx/fastcgi_params;
        fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
    }


    # cache configuration for most common files
    location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
        # Some basic cache-control for static files to be sent to the browser
        expires max;
        add_header Pragma public;
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
    }

    # drop common log errors
    location = /robots.txt { access_log off; log_not_found off; }
    location = /favicon.ico { access_log off; log_not_found off; }
    location ~ /\. { access_log off; log_not_found off; deny all; }
    location ~ ~$ { access_log off; log_not_found off; deny all; }
}