问题标签 [apache2-module]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
42 浏览

apache - 在 Apache 模块中使用 COM 可以吗

我需要为 Apache 编写一个模块。服务器将在 Windows 下运行,看起来我需要利用一些作为 COM 实现的功能。

可以在 Apache 模块中使用 COM 还是我应该尽量避免这种情况?

0 投票
1 回答
329 浏览

apache2 - 如何在 Ubuntu 10.10 上运行我自己的 apache 模块

我想玩我自己的 apache 模块(在 C 或 C++ 中,也许是 python),但我找不到任何解决方案。我缺少 apache 头文件(我在 /etc/apache2/ 中没有包含包含的 httpd 文件夹),即使我复制了我缺少一些头文件。我在哪里可以找到一些新 apache(不是 oldone 1.3)的好导师。也许你可以告诉我一些重要的事情,我必须记住这些事情来编写我自己的 apache 模块。

0 投票
1 回答
10804 浏览

apache - 我在哪里可以找到关于编写 Apache 模块(用 C 语言)的良好参考/教程?

我已经翻遍了,并没有真正找到任何东西。我需要三个基本的东西:

  1. 良好的 API 参考
  2. 某种教程
  3. 良好的架构概述

我有模块源代码并且正在浏览它——但对于它所做的大部分事情,我真的没有太多的上下文。

有什么建议么?

0 投票
0 回答
159 浏览

.htaccess - 无法使用 .htaccess 创建受密码保护的目录

我已经按照这个到 T 并且仍然无法获得一个工作密码保护目录 Apache 安装使用:

sudo aptitude install apache2 apache2.2-common apache2-mpm-prefork apache2-utils libexpat1 ssl-cert

我的 /var/www/whatever 文件夹中 htaccess 的内容

<IfModule mod_authn_file.c>

</IfModule>

和使用添加的 betachannel 密码

root@?:/etc/apache2# mkdir /var/passwd

root@?:/etc/apache2# htpasswd -c /var/passwd/.htpasswd betachannel

为用户 betachannel 添加密码

当我访问我的页面时,它就像白天一样清晰......?

0 投票
1 回答
1071 浏览

ruby-on-rails-3 - 为乘客安装 apache2-prefork-dev 时出错

大家好,当我使用以下命令安装 apache2-prefork-dev 时,我遇到了下一个问题:

sudo apt-get 安装 apache2-prefork-dev:

. . . 以下软件包具有未满足的依赖关系: apa​​che2-prefork-dev :依赖:libaprutil1-dev 但不会安装 E:损坏的软件包

为什么会出现这个错误?

我在 Windows 7 64 位中使用 vmware。

我有做:

sudo apt-get 更新 && sudo apt-get 升级

但我得到:

0 升级,0 新安装,0 删除,0 未升级。

我正在使用 ubuntu Ubuntu 10.10 - Maverick Meerkat - 于 2010 年 10 月发布并支持到 2012 年 4 月。

谢谢

0 投票
1 回答
1303 浏览

c - Apache2 模块中的分段错误

我目前正在阅读“The Apache Modules Book”这本书来学习编写 Apache2 模块。我尝试了书中的一些示例,在一种情况下,我遇到了分段错误,即使我完全复制并粘贴了作者网站上的源文件。

该示例是一个输出过滤器,用于处理对 *.txt 文件的请求,添加一个 html 页眉和页脚,其中包含请求的 txt 文件的 html 转义内容。

源代码位于:http: //apache.webthing.com/mod_txt/

apache的日志文件中的错误如下:

[Thu Jan 12 20:38:01 2012] [notice] child pid 3500 exit signal Segmentation fault (11)

我使用以下命令安装了模块:

使用 apxs2 时没有编译错误。

我在 httpd.conf 文件中添加了过滤器,如下所示:

代码有什么问题还是我在编译/安装/配置过滤器时做错了什么?

我的系统:Ubuntu Lucid Lynx 10.04.3 和 Apache 2.2.14 从默认的 Ubuntu 存储库安装。

我真的很感激任何提示!

提前致谢!

最好的问候,罗伯特

[编辑] 一些附加信息:

我使用 gdb 来获取有关段错误发生位置的更多信息。有什么办法可以得到准确的行号吗?

这是输出:

0 投票
3 回答
13422 浏览

apache2 - 如何卸载 apache2 模块?

看起来我使用apxs2.

一旦它被禁用 ( a2dismod),我如何删除它以便安装正确的版本?

看起来很简单,但是……不知何故……我在 Google、IRC 等上找不到任何东西。

0 投票
1 回答
1106 浏览

apache2 - apache2 - ssl 虚拟主机不执行 cgi 脚本

我有以下虚拟主机配置

即启用 ssl 的网站,但它不运行 cgi 脚本。

虽然我有完全相同的配置(没有 ssl 的东西),它运行 cgi 脚本完全没有问题。没有启用其他虚拟主机!

0 投票
2 回答
1556 浏览

tomcat - 通过 mod_proxy 时会话属性不再起作用

我有一个在“http://localhost:8080/appexploded/login.jsp”(Tomcat)上运行的 tomcat 应用程序。现在我已经安装了 Apache 并且正在运行 mod_proxy,以便端口 80 上的所有请求都可以代理到 8080。在我的 httpd.conf 文件中,这是我所拥有的:

因此,当我直接向 :8080 发出请求时,我的 request.getSession().getAttribute("BLAH") 从一页到另一页工作。但是,当我转到“http://localhost/ordergeek/login.jsp”时,该页面设置了一个会话属性,然后重定向到另一个页面。但是,下一页尝试读取 request.getSession().getAttribute("BLAH"),但没有找到。

当我不通过代理时……会话属性起作用。当我通过代理时,他们没有。我错过了什么?

我在 server.xml 中添加了以下内容:

0 投票
1 回答
2671 浏览

apache - Ensure execution order of two Apache Filters

I need to ensure my custom filter always executes before the mod_rewrite. As per Apache Tutor, filters do not run in a deterministic order:

The request processing axis is straightforward: the phases happen strictly in order. But confusion arises in the data axis. For maximum efficiency, this is pipelined, so the content generator and filters do not run in a deterministic order. So, for example, you cannot in general set something in an input filter and expect it to apply in the generator or output filters.

How to ensure execution sequence of two filters, or is it possible?


Update: Someone has indicated to mod_info to display detailed information about modules and their order.