Closed horak closed 3 years ago
The section denying access must be placed before the PHP section.
From the howto:
Having this said: The order of your rules do matter in Nginx, so make sure that the rules have the same order as we discuss them in this document.
The section denying access must be placed before the PHP section.
Yes, of course. I actually did try this and it didn't work. Updated the .conf to reflect my current non-working configuration.
In this case: No idea, sorry. :unamused:
I don't use nginx and I honestly never really understood nginx's very obscure config principles (to be more precise: I thought I understood it in the past, but since it should work but simply doesn't, I'm obviously wrong). Unfortunately a lot of people have issues with nginx's config. Sometimes there's an obvious error like a typo or a wrong section order, but if this isn't the case it often simply doesn't work for some unknown reason. I tried with a lot of people in the past, nobody got it working. I didn't write http://picocms.org/in-depth/nginx/ myself, but I indeed tested the config and it worked for me. But for some people it simply doesn't.
If you find a solution I'd be very pleased to know about it! :heart:
Besides that I can only recommend you to use a webserver for which one doesn't have to attend a academic course just to configure the webserver. I recommend Apache, it usually works out-of-the-box :v:
Welp, fair enough.
Try to move the regex location blocks inside the block for /. Or replace the block for / with a regex match too. Just two short ideas to debug it...
What's your Nginx version? Any OS-specific patches?
I ended up moving back to apache! Thanks for the ideas though. Closing :)
Problem: Nginx config allows the downloading of files
Pico Version: v2.1.4
Recreate Issue: Unfortunately, when I navigate to
my-domain/config/config.yml
, or anywhere else there's a file, it downloads.What I've tried: I've followed the instructions on the in-depth installation for Nginx and there's a section in there indicates you should include the following lines to avoid this: (Assuming pico's files are located in the root directory, which they are for me.)
Here is my full conf file:
Does anybody see any problems?