XF 2.2 Nginx Secure Install Directory

cloudpro

Member
Hello

we are trying to prevent access to the install/upgrade directory in Nginx. We have the follow config in our nginx server block.
Code:
location /community/install/ {
    internal;
}

Our XF is in a subdirectory /community

If we browse to https://ourpublicdomain.com/community/install we receive a 404 which is what we want. However if we use the direct link

PHP:
https://ourpublicdomain.com/community/install/index.php?upgrade/

then the upgrade page appears.

Can someone provide some insight as to the prevent public access besides securing it with a password.

Thank you
 
Solution
Hello

we are trying to prevent access to the install/upgrade directory in Nginx. We have the follow config in our nginx server block.
Code:
location /community/install/ {
    internal;
}

Our XF is in a subdirectory /community

If we browse to https://ourpublicdomain.com/community/install we receive a 404 which is what we want. However if we use the direct link

PHP:
https://ourpublicdomain.com/community/install/index.php?upgrade/

then the upgrade page appears.

Can someone provide some insight as to the prevent public access besides securing it with a password.

Thank you
Try:

Code:
location ^~ /community/install/ {
Hello

we are trying to prevent access to the install/upgrade directory in Nginx. We have the follow config in our nginx server block.
Code:
location /community/install/ {
    internal;
}

Our XF is in a subdirectory /community

If we browse to https://ourpublicdomain.com/community/install we receive a 404 which is what we want. However if we use the direct link

PHP:
https://ourpublicdomain.com/community/install/index.php?upgrade/

then the upgrade page appears.

Can someone provide some insight as to the prevent public access besides securing it with a password.

Thank you
Try:

Code:
location ^~ /community/install/ {
 
Solution
Back
Top Bottom