I have an issue opening a txt verification in the root folder that I need for one external service. I need to be able to open the file via url like: domain.com/txt_verification.txt . My server is running via ngnix on port 3000 with this app.js code:
var frontity = require("./build/server").default;
var http = require("http");
var server = http.createServer(frontity);
server.listen(3000);
I tried adding the file in the build and static folder but no luck, still getting the 404. Anyone has solution for this?
I’m afraid that’s not currently possible to do with Frontity. At this moment, the only .txt file you can serve from the root of your Frontity server is robots.txt (see SEO - Frontity).
By the way, once we release the Server Extensibility feature, Frontity developers will be able to extend their Frontity server and serve whatever files from Frontity directly, among other things.
That will be great! I am not very experienced with nginx so I was looking on how to make the txt file available via frontity. I will take a look at the Nginx reference that you sent me. Thanks! Looking forward for this option in Frontity!
For anyone that will want to open txt files in the root of the project on server with nginx configuration here is what I did: In the nginx domain configuration file I have added before the “Location /” line this line: location /text_file.txt { alias /var/www/website/static/text_file.txt; }