Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why should Lando enable MultiViews, which is disabled by Apache default? #66

Closed
mochiya-hemmi opened this issue Jul 21, 2023 · 5 comments

Comments

@mochiya-hemmi
Copy link

mochiya-hemmi commented Jul 21, 2023

Why "Options Indexes FollowSymLinks MultiViews" ?

I built a Drupal site with Lando and created a page called /example, but I got an Apache 404 Not Found.
This is because the "example.gitignore" file exists directly under the document root, and the MultiViews could not find the extension "gitignore".
By the way, ".htaccess" does not have a description to enable MultiViews. After some research, I found that MultiViews was enabled in Apache's VirtualHost options.

Options Indexes FollowSymLinks MultiViews

Options Indexes FollowSymLinks MultiViews

Options Indexes FollowSymLinks MultiViews

I looked at https://httpd.apache.org/docs/current/en/mod/core.html#Options to see what the Apache defaults are for this, but it seems that the only default value is Options FollowSymlinks.

I'm not sure why you needed to enable MultiViews, but at least it's hurting Drupal development.

I hope you can improve.
thank you.

@mochiya-hemmi mochiya-hemmi changed the title Why should Lando enable MultiView, which is disabled by Apache default? Why should Lando enable MultiViews, which is disabled by Apache default? Jul 24, 2023
@reynoldsalec
Copy link
Sponsor Member

@pirog you know any reasons why this is in the default apache config for PHP?

I think Drupal does have some .htaccess rules to disable MultiViews under certain circumstances (like hardening access to files), and it looks like some other projects disable MultiViews for PHP CGI.

@reynoldsalec
Copy link
Sponsor Member

...looks like there's an older issue this duplicates: lando/lando#3139

Also found another instance where having MultiViews enabled caused some confusion: lando/apache#20

@reynoldsalec
Copy link
Sponsor Member

reynoldsalec commented Oct 25, 2023

Doing further research on this, it sounds like the default Apache conf in Lando's PHP plugin is legacy from some default @pirog found a LONG time ago.

My research seems to indicate that most default confs either don't include MultiViews or disable it explicitly, as you expressed @mochiya-hemmi.

I think if we just drop MultiViews from the config, it'll be disabled by other config already in the PHP images. Created a PR to that effect and will test a bit.

@pirog
Copy link
Sponsor Member

pirog commented Oct 25, 2023

@reynoldsalec it might make sense to find the version where this was changed and have two sets of config files for before and after it was changed

reynoldsalec added a commit that referenced this issue Nov 21, 2023
…78)

* #66: Remove MultiViews from our Apache config.

* Include nginx plugin after the great decoupling.

* Refactor plugin to use new builders directory and break out utils.

* Isolate tests for hardcore. Fix pkger missing issue from refactor.

* Install all plugins to get nginx dependency.

* Add install-composer.sh script.

* Update workflows to detach from other services.

* Add php-nginx service to detach from reliance on global nginx.

* Feed linter.

* Include nginx in main php builder as well.

* Update .node-version file.

* More updates to GA tests.

* Debug code.

* Try using explicit type on 5.3 tests.

* New loading scheme for php-nginx.

* Debugging info and get rid of type on custom_nginx 5.3.

* Isolate php extension tests and don't destroy 5.3 for debugging.

* Debugging.

* Docker logs debugging.

* Debug trying depends_on

* Add depends_on for php-fpm universally.

* Isolate PHP Other tests.

* Clean up code.

* Update Changelog and fix issue with composer dependency downloading.

* Feed the linter.
@reynoldsalec
Copy link
Sponsor Member

@mochiya-hemmi this should be resolved as of PHP v0.10.0, which will be available in Lando releases going forward. If you want to try installing the latest PHP version, you can manually install it using the "Docker" instructions: https://docs.lando.dev/php/#custom-installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants