apache-modules

URL Rewriting doesn't seem to work. Apache2

允我心安 提交于 2019-12-05 05:51:01
I would like it so that when the user goes to http://mysite.com/home that it redirects him to http://mysite.com/page.php?id=home . This is what I put in my .htaccess, but it doesn't seem to work. RewriteEngine On RewriteRule ^/(.+)$ page.php?id=$1 [NC,L] It just sends me to the /home directory, with a nice 404. Help is appreciated. Thanks. Edit: I've tried some rewrite I know work, so now I'm certain it's not that my problem. I checked with phpinfo() and yes, mod rewrite is running, I set up apache2 with LAMP, I'm running the latest version of Linux Mint. Alexandre Hitchcox Ok well I fixed the

Problem compiling a WebLaz project under Lazarus

旧巷老猫 提交于 2019-12-04 18:26:29
My specs: OS: Ubuntu 10.04 LTS amd64 fpc: 2.4.0 lazarus: 0.9.28 I'm trying to compile a WebLaz project just by creating one and then compiling. Somehow the compiler gets all lost when determinig witch httpd and fpapache Units to use. I've found similar problems in the forums: mod_helloworld.lpr Can't find fpapache Unit ... I NEED HELP with fpweb ... After trying some of the solutions provided there I'm still at this point: Project compiles fine if I only have httpd22 under the Compiled units and the Source for the packages. Alas it then completely fails to link. With the original fpc/lazarus

Apache module command parser prototype

流过昼夜 提交于 2019-12-04 12:48:12
I am creating an Apache2 module and experiencing a weird compilation problem. This is prototype of my function used to parse config command named " analytics_ip ": static const char *apr_cfg_set_analytics_ip(cmd_parms *cmd, void *config, const char *data); This is array of command_rec structures containing pointers to this function: static const command_rec apr_cmds[] = { AP_INIT_TAKE1("analytics_ip", apr_cfg_set_analytics_ip, NULL, OR_ALL, ""), { NULL } }; Structure command_rec is declared in header file http_config.h typedef struct command_struct command_rec; struct command_struct { /** Name

How can I write an Apache module in C++?

旧巷老猫 提交于 2019-12-04 12:36:28
I'd like to write an Apache module in C++. I tried a very barebones module to start: #include "httpd.h" #include "http_core.h" #include "http_protocol.h" #include "http_request.h" static void register_hooks(apr_pool_t *pool); static int example_handler(request_rec *r); extern "C" module example_module; module AP_MODULE_DECLARE_DATA example_module = { STANDARD20_MODULE_STUFF, NULL, NULL, NULL, NULL, NULL, register_hooks }; static void register_hooks(apr_pool_t *pool) { ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST); } static int example_handler(request_rec *r) { if (!r->handler ||

Apache Proxy: No protocol handler was valid

主宰稳场 提交于 2019-12-02 13:52:22
I am trying to proxy a subdirectory to another server. My httpd.conf: RewriteEngine On ProxyPreserveHost On RewriteRule .*subdir/ https://anotherserver/subdir/ [P] The problem is that Apache is always logging this: AH01144: No protocol handler was valid for the URL /subdir/. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule., referer: http://localhost/ So after searching the internet, I have activated these modules: LoadModule headers_module modules/mod_headers.so LoadModule proxy_module modules/mod_proxy.so

Compiling Apache web server with dynamic module support

試著忘記壹切 提交于 2019-12-02 05:18:59
问题 I have just compiled Apache 2.2.17 on a fresh install of Ubuntu 10.04.2. It's a learning exercise to discover what actually goes on when you compile something rather than just using apt-get hence the avoidance of using apt-get in favour of compiling the thing myself. I ran: sudo ./configure --prefix=/etc/apache --enable-module=so --enable-rule=SHARED_CORE --enable-shared=max --enable-ssl=shared --enable-rewrite=shared followed by the obligatory: sudo make && sudo make install All seemed to go

Compiling Apache web server with dynamic module support

孤者浪人 提交于 2019-12-02 00:58:47
I have just compiled Apache 2.2.17 on a fresh install of Ubuntu 10.04.2. It's a learning exercise to discover what actually goes on when you compile something rather than just using apt-get hence the avoidance of using apt-get in favour of compiling the thing myself. I ran: sudo ./configure --prefix=/etc/apache --enable-module=so --enable-rule=SHARED_CORE --enable-shared=max --enable-ssl=shared --enable-rewrite=shared followed by the obligatory: sudo make && sudo make install All seemed to go well (Apache starts up no problems) except that in the Apache modules directory where I would have