Want more timely Centmin Mod News Updates?
Become a Member

Password protect zendopcache file

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Mar 17, 2015.

  1. pamamolf

    pamamolf Well-Known Member

    2,726
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    1:40 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hi

    How can i password protect the zendopcache stats file like memcache one?

    Or maybe password protect the folder: /usr/local/nginx/html/

    I know how to use the python script to create a password file but then how can i configure this ? :

    Code:
    location ^~/pathnotafolder/ {
    auth_basic "Private";
    auth_basic_user_file /usr/local/nginx/conf/htpasswd;
    include /usr/local/nginx/conf/php.conf;
    }
    And in which file should i add it as there is no domain.conf file for this path?

    Thanks
     
    Last edited: Mar 17, 2015
  2. eva2000

    eva2000 Administrator Staff Member

    30,194
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    8:40 AM
    Nginx 1.13.x
    MariaDB 5.5
    see PHP Opcode and Memcached statistics pages | Centmin Mod Community as well as Nginx - How to properly password protect a directory or file? | Centmin Mod Community

    everything in /usr/local/nginx/html relates to virtual.conf main hostname's Nginx vhost file see Getting Started Step 1 and bottom of the page to see relationship between main hostname's Nginx vhost and other domains.

     
    • Like Like x 1
  3. pamamolf

    pamamolf Well-Known Member

    2,726
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    1:40 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Ok thanks got it now :)
     
    Last edited: Mar 17, 2015