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

How to serve files?

Solved by Werner Joss View solution

Started by Cédric M. Campos 7 years ago · 3 replies · 663 views
7 years ago

Hi there!

I am trying to simply serve a file at my site (a gpg public key). The file is only to be downloaded and not rendered. It is not site-related in the sense it belongs to no page. I've tried to put it in the site's root directory but I get a 404 error. How should I proceed?

Thx in advance.

7 years ago Solution

@cedricmc ,
the problem is most probably related to the webserver configuration, which does not allow .asc (or .gpg) files to be served for security reasons.
you can work around this by packing you key file into a zip (or gz) file.
that's what I do, and it works for me.
and, welcome to the grav community :D .

7 years ago

Thx, @hoernerfranz. You are right, I can download it when gzipped.

Aside of this problem, is there a particular folder to put files that are not specifically related to a page?

7 years ago

@cedricmc, I'm not sure if there is an official recommendation - I use user/data/downloads for this.

Suggested topics

Topic Participants Replies Views Activity
Support · by complanar, 6 days ago
6 140 18 hours ago
Support · by Rick Beebe, 6 days ago
2 100 2 days ago
Support · by blu3prince, 3 days ago
0 52 3 days ago
Support · by alex, 4 days ago
2 93 3 days ago
Support · by Marcel, 2 weeks ago
1 143 4 days ago