Re: Add a variable on http header
Hi, Am 06.06.2011 14:15, schrieb Maurizio Totti: Hi, I would try to set an http header variable on the fly but without success :-( I write this simple module to test the functionality why writing a module for that? Better use Add|SetHeader et al from mod_headers. with kind regards, Robert Schulze
Re: apr_shm_attach fails with permission denied
Hi, Sorin Manolache schrieb: On Wed, Sep 2, 2009 at 14:58, Robert Schulzer...@bytecamp.net wrote: Hi, a module creates a named shared memory segment in the post_config hook. During child initialisation, apr_shm_attach is called, which in my case fails with permission denied. Does it work if you start apache as root? The problem was cause by giving the shm-pointer to a function, which should initialize the segment. Somehow the shm was initialized privately, I don't know what I did wrong, but fixed that now. Robert Schulze
apr_shm_attach fails with permission denied
Hi, a module creates a named shared memory segment in the post_config hook. During child initialisation, apr_shm_attach is called, which in my case fails with permission denied. Is this considered normal behaviour? How can I deal with that? with kind regards, Robert Schulze
correct hook function after accepting connection
Hi, is there a hook for dealing with connections *before* any http data is read? The reason for this todo would be dropping connections from hosts without ever reading the request - keeping slowloris in mind. With kind regards, Robert Schulze -- /7\ bytecamp GmbH Geschwister-Scholl-Str. 10, 14776 Brandenburg a.d. Havel HRB15752, Amtsgericht Potsdam, Geschaeftsfuehrer: Bjoern Barnekow, Frank Rosenbaum, Sirko Zidlewitz tel +49 3381 79637-0 werktags 10-12,13-17 Uhr, fax +49 3381 79637-20 mail r...@bytecamp.net, web http://bytecamp.net/
Re: external redirect
Hi, fka...@googlemail.com schrieb: However, when I also try to set the new Location this always causes a segmentation fault: char* uri=apr_pstrdup(r-pool,http://localhost/abcdef;); apr_table_setn(r-headers_out,Location,uri); return HTTP_MOVED_TEMPORARILY; Like others stated, it works this way, I used that in one module, too. Maybe you should replace apr_table_setn() by apr_table_set(), which means that the memory for the entry will be allocated by apr_table_set() once more. Rob
Re: mass virtual hosting and error-logging
Hi, Ray Morris schrieb: If you do set DOCUMENT_ROOT, it would be great if you made that change in the mass virtual hosting module, Of course, that is done by my module. What I asked for was error logging. Rob
Re: what should be done in a vhost_db module?
Hi, ed schrieb: I'm not sure that I understand what you're doing here by creating virtual hosts on the fly, I mean, on request basis (from a db). So what I wanted to know is, whether there are any hints, what a mod_vhost_??? module is supposed to do (or set). I'm now setting r-server-server_hostname by allocating space from r-server-process-pool so I hope I have fixed the memory issues. Are you doing this to save memory? This is one important fact - it saves a huge amount of memory with several thousands of virtualhosts. One more interesting thing is, that apache does not need to be restarted when adding domains :-) Rob
what should be done in a vhost_db module?
Hi, I'm currently working on a module to create virtualhosts on the fly out of a cdb-database file. I looked at some module which do basically the same with other data sources. What I now wonder is, what else I have to do except for setting the r-filename and maybe some script-alias-foo. In one module I saw the following: 8 request_rec *top = (r-main)?r-main:r; /* ... */ top-server-server_hostname = apr_pstrdup (top-pool, hostname); r-parsed_uri.hostinfo = apr_pstrdup(r-pool,r-server-server_hostname); r-parsed_uri.hostname = apr_pstrdup(r-pool,r-server-server_hostname); 8 and thats exactly where I got some problems. I sometimes noticed, that the virtual host name in /server-status/ contained only weird characters, which I think is a result of freeing a buffer which is currently in use. I think the problem is the wrong pool for allocating space for the server_hostname. I thought I fixed that with this solution: 8 if(r-hostname!=NULL) { r-server-server_hostname = apr_pstrdup(r-connection-pool, r-hostname); r-parsed_uri.hostinfo = apr_pstrdup(r-pool,r-server-server_hostname); r-parsed_uri.hostname = apr_pstrdup(r-pool,r-server-server_hostname); } 8 But that didn't fix the problem completely. My question now: do I have to set server-server_hostname and if so, from which pool should I allocate the memory from? with kind regards, Robert Schulze
Re: Query on deletion of Request pool
Hi, On Wed, Mar 26, 2008 at 10:51 PM, Arnab Ganguly [EMAIL PROTECTED] wrote: In the particular box only Apache is running no other application process is running.Also one more observation was when the Apache is stopped the free -m doesn't result to the original memory restore.We have to reboot the box to restore the original RAM. It up to the OS to mark the freed areas as free or use it as a filesystem buffer or whatever buffer, as long as the memory isn't needed by applications. with kind regards, Robert Schulze