Home  >  Q&A  >  body text

nginx web directory access permission problem

Set the nginx web directory. For example, www.test.com corresponds to the /var/www/test/ directory. How to prevent the files in the /var/www/test/ceshi/ directory from being accessed

为情所困为情所困2713 days ago450

reply all(2)I'll reply

  • 阿神

    阿神2017-05-16 17:09:24

    Try this:

    location  /test/ceshi { 
              deny all; 
              return 403; 
    }

    reply
    0
  • 滿天的星座

    滿天的星座2017-05-16 17:09:24

    Files that are not allowed to be accessed are placed in the web directory. What does your company's security department do...

    reply
    0
  • Cancelreply