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

Nginx: Handling Php scripts #144

Open
ragnarkurmwunder opened this issue Sep 8, 2020 · 0 comments
Open

Nginx: Handling Php scripts #144

ragnarkurmwunder opened this issue Sep 8, 2020 · 0 comments
Labels
invalid This doesn't seem right nginx

Comments

@ragnarkurmwunder
Copy link
Contributor

https://wunder.slack.com/archives/CAC0EPL1G/p1597852312006400?thread_ts=1597852274.006300&cid=CAC0EPL1G

        ## Disallow these update scripts as they are not used in current workflow, Drupal 7/8.
        location ~ ^/(update.php|core/update.php) {
            return 404;
        }
        ## Disallow these install cripts as they are not used in current workflow, Drupal 7/8.
        location ~ ^/(install.php|core/install.php) {
            return 404;
        }

It seems unnecessary, because of this:

        ## Any other attempt to access PHP files returns a 404.
        location ~* ^.+\.php$ {
            return 404;
        }

In case of the latter, the RX can be made faster:

location ~* \.php$ {
@ragnarkurmwunder ragnarkurmwunder added invalid This doesn't seem right nginx labels Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right nginx
Projects
None yet
Development

No branches or pull requests

1 participant