Used for transferring files to Apache.
Create Directory to Handle Uploaded Files
sudo mkdir -p /var/www/uploads/SecretUploadDirectoryChange the Owner to www-data
sudo chown -R www-data:www-data /var/www/uploads/SecretUploadDirectoryCreate Nginx Configuration File
In /etc/nginx/sites-available/upload.conf:
server {
    listen 9001;
 
    location /SecretUploadDirectory/ {
        root /var/www/uploads;
        dav_methods PUT;
    }
}Symlink our Site to the sites-enabled Directory
sudo ln -s /etc/nginx/sites-available/upload.conf /etc/nginx//sites-enabled/Start Nginx
sudo systemctl restart nginx.serviceError messages can be found in: /var/log/nginx/error.log.
For example:
ss -lnpt | grep '80'ps -ef | grep '2811'Could output something like python -m websockify 80 localhost:5901 -D which means there is a module already listening to port 80. To get around we can get rid of the default Nginx configuration:
sudo rm /etc/nginx/sites-enabled/defaultAnd now we test:
curl -T /etc/passwdtail -1 /var/www/upload/SecretUploadDirectory/users.txtThen we can navigate to http://localhost/SecretUploadDirectory.