Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Nginx+;Zend框架:Htpasswd保护模块_Php_Zend Framework_Nginx - Fatal编程技术网

Php Nginx+;Zend框架:Htpasswd保护模块

Php Nginx+;Zend框架:Htpasswd保护模块,php,zend-framework,nginx,Php,Zend Framework,Nginx,我正在Ubuntu上运行nginx1.1.19。 在我的Zend Framework 1项目中,我想保护一个特定的模块,比如: 我不是想劫持你的问题,但是你有没有理由需要使用htpasswd而不是内置的auth/ACL?谢谢你的回答。我们不能使用auth/acl有一些内部原因,这就是我们处理htpasswd的原因。因此,感谢您的回答,但我希望为htpasswd提供一个解决方案。 server { root /srv/www/example/public; index index.php;

我正在Ubuntu上运行nginx1.1.19。 在我的Zend Framework 1项目中,我想保护一个特定的模块,比如:


我不是想劫持你的问题,但是你有没有理由需要使用htpasswd而不是内置的auth/ACL?谢谢你的回答。我们不能使用auth/acl有一些内部原因,这就是我们处理htpasswd的原因。因此,感谢您的回答,但我希望为htpasswd提供一个解决方案。
server {
 root /srv/www/example/public;
 index index.php;
 ...
 location ~ \.php$ {
 fastcgi_pass 127.0.0.1:9000;
 include fastcgi_params;
 }
 ...
}
  location ~ ^/protected/.+\.php$ {
      auth_basic "restricted";
      auth_basic_user_file  htpasswd/mypasswd;
      fastcgi_pass 127.0.0.1:9000;
      include   fastcgi_params;
    }