首页 \ 问答 \ Nginx Basic Auth和子文件夹(Nginx Basic Auth and subfolders)

Nginx Basic Auth和子文件夹(Nginx Basic Auth and subfolders)

我在基本的auth procted文件夹中遇到了子文件夹的问题。 在受保护的文件夹中,我有一个名为phpmyadmin的文件夹,其中包含phpmyadmin。 当基本激活时,我无法运行phpmyadmin。 当我调用该文件夹时,我得到一个另存为对话框(类型:application / octet-stream(18,3 KB))。

这里是mysites的重要部分 - 可用/默认

location ^~ /administration/ {
    auth_basic            "Restricted Area";
    auth_basic_user_file  /var/www/myproject/sec/htpasswd;
}

location ~ \.php$ {
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
}

任何想法,我如何在基本身份验证保护子文件夹中运行php?


I have a problem with subfolders in a basic auth procted folder. In the protected folder i have a folder named phpmyadmin, which contains phpmyadmin. Im not able to run phpmyadmin, when basic is activated. Whenn i call the the folder, i get a save-as dialog (type: application/octet-stream (18,3 KB)).

Here the important parts of mysites-available/default

location ^~ /administration/ {
    auth_basic            "Restricted Area";
    auth_basic_user_file  /var/www/myproject/sec/htpasswd;
}

location ~ \.php$ {
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
}

Any ideas, how i can run php in basic-auth protected subfolders?


原文:https://stackoverflow.com/questions/16779131
更新时间:2022-05-25 11:05

最满意答案

本书 - 编程语言:应用和解释可能是一个很好的起点,尤其是第十二章“领域特定语言和元编程”。 它使用PLT Scheme代码示例,整本书值得一读。


The book - Programming Languages: Application and Interpretation might be a good place to start, especially chapter XII "Domain-Specific Languages and Metaprogramming". It uses PLT Scheme for the code samples, and the entire book is a worthy read.

相关问答

更多
  • 不,我不这么认为。 另外唯一一本印刷版权专业书籍(AFAIK)是出色的“PLT Redex语义工程” ,但我不认为这就是您要找的。 你也可能对Krishnamurthi的编程语言:应用和解释感兴趣。 这些都是针对编程语言的人。 HTH No, I don't believe so. The only other PLT-specific book that's in print right know (AFAIK) is the excellent "Semantics Engineering with P ...
  • 这是一种获取代码修复(根据代码位于虚拟内存中的位置调整地址)的方式,而无需为每个进程维护单独的代码副本。 PLT是程序联动表,使动态加载和链接更容易使用的结构之一。 printf@plt实际上是一个小的存根(最终)调用真正的printf函数。 这个真正的功能可以被映射到给定进程(虚拟地址空间)中的任何位置,以及调用它的代码。 因此,为了允许调用代码的正确代码共享(左下方),您不想直接应用任何fixup,因为这将限制其他进程中的位置。 在运行时可靠地计算的地址上, PLT是一个较小的进程特定区域, 不是在进程 ...
  • Linux版本的PLT基于来自wxWindows的旧分支(从它重命名为wxWidgets之前)。 有一些工作正在最终用Scheme代码替换所有C和C ++代码,并且还从原始X后端移动到使用gtk。 在此之前(可能需要一段时间),最好的办法是坚持使用通常的基于mred的代码; 这样,当切换完成后它将继续正常工作 - 并且您仍然保持可移植性的优势(因为它在Windows和OS X上的行为也相同)。 The Linux version of PLT is based on an old fork from wxW ...
  • 在GCC printf和puts是内置函数。 这意味着编译器完全了解它们的语义。 在这种情况下,如果编译器认为它会生成更好(更快和/或更紧凑)的代码,那么编译器可以自由地将调用替换为对另一个函数的调用。 因为它不需要解析和解释格式字符串,所以puts是一个更高效的函数。 这正是你所遇到的情况。 你第一次调用printf并不需要任何printf特有的功能。 您提供给printf的格式字符串很简单:它没有转换说明符。 编译器认为你对printf的第一次调用最好是与printf相同的调用。 同时,你对printf ...
  • 问题是用call [printf@GOTPLT]替换call printf@PLT要求编译器知道函数printf存在于共享库中而不是静态库(甚至只是普通的目标文件中)。 链接器可以将call printf更改为call printf@PLT ,将jmp printf更改为jmp printf@PLT ,甚至可以将mov eax, printf更改为mov eax, printf@PLT因为它所做的就是将基于符号printf重定位更改为基于重定位的重定位符号printf@PLT 。 链接器无法将call pr ...
  • 如果你想使用和的函数形式and ( or它们不会短路的限制)并且不丢失变量arity属性,那么你可以很容易地这样做: (define (and* . xs) (andmap values xs)) (define (or* . xs) (ormap values xs)) ( values是(PLT)Scheme中的惯用标识函数。) If you want to use a function form of and and or (with the limitation that they will n ...
  • 本书 - 编程语言:应用和解释可能是一个很好的起点,尤其是第十二章“领域特定语言和元编程”。 它使用PLT Scheme代码示例,整本书值得一读。 The book - Programming Languages: Application and Interpretation might be a good place to start, especially chapter XII "Domain-Specific Languages and Metaprogramming". It uses PLT S ...
  • 您可以使用require-library从标准库加载东西: http://download.plt-scheme.org/doc/103p1/html/mzscheme/node157.htm (require-library "spidey.ss") 您还可以使用支持工具(加载和朋友)来加载单个文件。 您需要使用绝对路径,否则它将相对于您当前的工作目录进行搜索。 http://download.plt-scheme.org/doc/103p1/html/mzscheme/node149.htm (loa ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)