summaryrefslogtreecommitdiff
path: root/etc/nginx/sites-enabled/f.exemple.fr.conf
blob: 6e31a5cb659fe59119623c37fd4e2ac9821b5975 (plain) (blame)
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
perl_modules /usr/local/lib/perl; # Path to upload.pm.
perl_require upload.pm;

server {
    listen 80;
    server_name f.exemple.fr;
    location / {
        return 301 https://$host$request_uri;   
    }
}

server {
    # Specify directives such as "listen", "server_name", and TLS-related
    # settings for the "server" that handles the uploads. 
    listen 443 ssl http2;
    server_name f.exemple.fr;
    ssl_certificate /etc/letsencrypt/live/f.exemple.fr/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/f.exemple.fr/privkey.pem; 


    # Uploaded files will be stored below the "root" directory. To minimize
    # disk I/O, make sure the specified path is on the same file system as
    # the directory used by Nginx to store temporary files holding request
    # bodies ("client_body_temp_path", often some directory below /var).

    root /var/www/upload;
    index index.html;

    # Specify this "location" block (if you don't use "/", see below):
    location / {
        perl upload::handle;
    }

    # Upload file size limit (default: 1m), also specified in your XMPP
    # server's upload module configuration (see below):
    client_max_body_size 100m;
}