Uh oh!
There was an error while loading. Please reload this page.
Unit: Restrict access to hidden files and have PHP process files directly - #458
Conversation
jaydrogers
commented
Oct 15, 2024
I am very grateful for your contributions! Thanks for taking a swing at this for me since I am still very new to Unit. I did pull your changes down and I ran into this error after building your image locally. ErrorSteps to reproduceBuild your image using the bash scripts/dev.sh --version 8.3.11 --variation unit --os bookwormBring up this example app under this specific branch: https://github.com/jaydrogers/docker-php-test-app/tree/458-unit-testing. It looks like it could be a simple syntax error, but I have been heads down on getting v3.4 out. I might bump these updates to v3.5 if we can get a solid way Unit config rolling. |
jpangborn
commented
Oct 15, 2024
Missing common. The build script completes successfully now. |
jaydrogers
commented
Oct 15, 2024
Thank you! This should be made available with v3.4! I will get a |
Updating the routing in the Unit configuration to accomplish a couple of things:
The following routes step restricts access to hidden files and folders (start with
.)The following section allows the processing of PHP files requested directly. See #11 for more details. The issue with PHP files being downloaded instead of processed was due to the
shareentry in theaction. Theshareentry will download the file if there is a match and pass the URI to the application handler only if the file doesn't exist. Removing theshareentry and moving thepassentry out offallbackallows the PHP file to be processed directly.