Home  >  Q&A  >  body text

Can the Nginx configuration file restrict users from requesting PHP files with -rwxrwxrwx permissions to call PHP-FPM?

Like the title ..

Don’t want to parse PHP files with permission 777

漂亮男人漂亮男人2713 days ago597

reply all(2)I'll reply

  • 漂亮男人

    漂亮男人2017-05-16 17:22:04

    It seems that there is no access control based on file attributes. From what I understand, your needs can really be used to control access to a certain file.

            location ~ /config.php {
                deny all;
            }

    reply
    0
  • 为情所困

    为情所困2017-05-16 17:22:04

    If you don’t want access, set the file permissions to 0600

    reply
    0
  • Cancelreply