nurkka Posted November 6, 2024 Posted November 6, 2024 I often have problems with the ProcessWire .htaccess file. As my clients are using different hosting providers and I am working with DDEV locally, I have to deal with htaccess issues very often. The main problem seems to be the directive `Options +FollowSymLinks` and `Options +SymLinksifOwnerMatch`, but sometimes also the other options, which are marked as error 500 critical in the ProcessWire htaccess file. Currently, I have a project with two different htaccess files, because the staging and production server allow and deny different options. - Is `Options +FollowSymLinks` or `Options +SymLinksifOwnerMatch` really needed? Or can they be omitted?
bernhard Posted November 6, 2024 Posted November 6, 2024 Both directives are needed if you have symlinks in your setup, which will be the case if you use RockMigrations deployments for example. If you don't have any symlinks I guess you could remove them, but I'm not sure if anything else needs them. I don't have any problems with DDEV.
nurkka Posted November 6, 2024 Author Posted November 6, 2024 Thanks @bernhard , for the info, that RockMigrations deployments are using symlinks. I am using RockMigrations but not RockMigrations deployments (yet). So if ProcessWire doesn't use symlinks, I could simply comment out those two symlink directives and would have only one version of my .htaccess to maintain. Do you or does anybody know if ProcessWire itself uses symlinks?
bernhard Posted November 6, 2024 Posted November 6, 2024 11 minutes ago, nurkka said: So if ProcessWire doesn't use symlinks, I could simply comment out those two symlink directives and would have only one version of my .htaccess to maintain. Do you or does anybody know if ProcessWire itself uses symlinks? Or something like this? (untested, never used) <If "%{HTTP_HOST} == 'foo.ddev.site'"> Options +FollowSymLinks </If> <Else> Options +SymLinksifOwnerMatch </Else>
nurkka Posted November 6, 2024 Author Posted November 6, 2024 Wow, I never thought that would be possible – although I am using something similar in my config.php 🙂 Thanks @bernhard !
poljpocket Posted November 9, 2024 Posted November 9, 2024 On 11/6/2024 at 5:40 PM, bernhard said: Both directives are needed if you have symlinks in your setup, which will be the case if you use RockMigrations deployments for example. If you don't have any symlinks I guess you could remove them, but I'm not sure if anything else needs them. I don't have any problems with DDEV. I am seeing the same as OP on many of our hosting partners: Some just won't allow you to use FollowSymlinks. Ever. This renders your plugin unusable on these installations. You should maybe mention this in your docs somewhere...
bernhard Posted November 9, 2024 Posted November 9, 2024 11 hours ago, poljpocket said: This renders your plugin unusable on these installations. You should maybe mention this in your docs somewhere... I don't understand, could you please be more specific?
poljpocket Posted November 10, 2024 Posted November 10, 2024 Well, what I mean is that your deployments function won't work on any installation which needed the .htaccess edited (= comment out FollowSymlinks line) for ProcessWire to run properly. If you are checking for symlink function and work around it if it's not available, I retract everything I said :).
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now