Get the most out of your Centmin Mod LEMP stack
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

    4,022
    421
    83
    May 31, 2014
    Ratings:
    +816
    Local Time:
    3:02 AM
    Nginx-1.17.x
    MariaDB 10.3.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

    50,473
    11,663
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,086
    Local Time:
    10:02 AM
    Nginx 1.25.x
    MariaDB 10.x
    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.

     
  3. pamamolf

    pamamolf Well-Known Member

    4,022
    421
    83
    May 31, 2014
    Ratings:
    +816
    Local Time:
    3:02 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Ok thanks got it now :)
     
    Last edited: Mar 17, 2015