Nginx SSL conf to access phpMyAdmin

Igor Sysoev igor at sysoev.ru
Sat May 8 15:17:12 MSD 2010


On Fri, May 07, 2010 at 08:04:38PM -0400, ideanet wrote:

> thank you Igor!
> just another question: it's possible to define an "allow hosts list" (IP or range of IP) for the phpmyadmin directory ?

     location ~ ^/phpmyadmin/.+\.php$ {
         try_files  /system/maintenance.html  $uri  =404;

         allow  192.168.1.0/24;
         allow  192.168.3.0/24;
         deny   all;

         fastcgi_pass backend;
         include /etc/nginx/fastcgi_params;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
         fastcgi_param HTTPS on;
     }

     location ~ \.php$ {
         ...


-- 
Igor Sysoev
http://sysoev.ru/en/



More information about the nginx mailing list