Uploading an image to remote server returns code: 0


I’m hosting Grav on a digital ocean droplet with Nginx. I’m using the Grav config file supplied in the digital ocean tutorial in the documentation. When I upload an image remotely I get a response of 0 from the server.

Not sure what the problem is but could it be that the file is too big? It’s only 7.1MB
Or perhaps something wrong with my Nginx configuration.

I’ve added an SSL cert so have had to add a few lines:

This inside the original server block:

 location ~ /.well-known {
            allow all;

I’ve commented out the line listen 80 default_server; And added (my domain is actually set to the correct domain):

listen 443 ssl;

    server_name my domain.com www.mydomain.com;

    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

The certificate is working as expected.
Could this be causing problems with uploading images?


Looks a fairly common error message with the Dropzone library we use https://www.google.com/search?q=server+responded+with+0+code

First, check the PHP config’s upload_max_filesize value

Next, could be permission issues on the page folder. Is it writeable by the web server user?