Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Uploading an image to remote server returns code: 0

Solved by flavio View solution

Started by Theo M Jones 9 years ago · 1 replies · 1525 views
9 years ago

Hi,

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.

<img src="//cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex036/uploads/getgrav/original/1X/036178b7d799b9431e10c38897c782f2318ab2d9.png" width="240" height="201">

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:

TXT
 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):

TXT
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?

Thanks

Suggested topics

Topic Participants Replies Views Activity
Installation & Hosting · by jeremycherfas, 20 hours ago
1 46 16 hours ago
Installation & Hosting · by motorambler, 2 weeks ago
8 359 6 days ago
Installation & Hosting · by antoinep, 3 months ago
8 937 3 months ago
Installation & Hosting · by Jürgen Dietrich, 9 months ago
0 601 9 months ago
Installation & Hosting · by rappluk, 11 months ago
0 646 11 months ago