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; }