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 Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:39 AM
    Nginx-1.25.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

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,672
    Local Time:
    12:39 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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 Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:39 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Ok thanks got it now :)
     
    Last edited: Mar 17, 2015