Re: [users@httpd] Apache 2.4 optimisation for a virtual server with low resources.

2014-08-11 Thread Pablo Garcia Melga
Robin, I haven't tested on 2.4, but done many times on 2.2 and 1.3, I would
compile it myself, just using the mods you need, and after that I would
stripe the symbols to make the binary even smaller.

Hope it helps

Regards, Pablo


On Mon, Aug 11, 2014 at 7:42 PM, Robin de Haan 
wrote:

> Hi,
>
> I'm a web designer setting up a server for the first time using a very
> light Linode package with 1GB RAM and 1 CPU. It will host a Drupal site
> that gets low traffic. It's running Ubuntu 14.04 and Apache 2.4.7.
>
> I'm following their set up guide here:
> https://www.linode.com/docs/websites/hosting-a-website/ which suggests
> editing apache2.conf with the following:
>
> 
> StartServers 2
> MinSpareServers 6
> MaxSpareServers 12
> MaxClients 80
> MaxRequestsPerChild 3000
> 
>
> When I couldn't find anything like that code in the .conf file I checked
> with Linode support and was told that, from Apache 2.4 "This section is
> built-in now and not included in the apache2.conf" but when I asked how
> then to optimize Apache for a light server a different support person got
> back to me and said I could just add that code to the end of the .conf file.
>
> I'm posting here hoping a specialist can clear this up or advise an
> alternative way to optimise Apache for this kind of server.
>
> Thanks,
> Robin
>


Re: [users@httpd] mod_rewrite does not change URL in browser

2011-04-15 Thread Pablo Garcia Melga
Jeff, from your log you seem to be requesting /oldsite, but in your rewrite
rule you specify that only requests that ends with .html will be taken into
consideration.
a request to /oldsite/index.html should work.

Regards, Pablo

On Fri, Apr 15, 2011 at 2:46 PM, Jeff Shearer wrote:

> Thanks Eric for the quick response.  However, it still doesn't work.  I
> copied you suggestion to the substitute part of the command as well as using
> the actual host and domain with no success.  Following is the rewrite.log
> using your suggestion letter for letter:
>
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb27f070/initial] (3)
> applying pattern '^/oldsite/(.*)\.html' to uri '/oldsite'
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb27f070/initial] (1) pass
> through /oldsite
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb287320/initial] (2) init
> rewrite engine with requested uri /oldsite/
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb287320/initial] (3)
> applying pattern '^/oldsite/(.*)\.html' to uri '/oldsite/'
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb287320/initial] (1) pass
> through /oldsite/
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb281080/subreq] (2) init
> rewrite engine with requested uri /oldsite/index.html
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb281080/subreq] (1) pass
> through /oldsite/index.html
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb285310/initial] (2) init
> rewrite engine with requested uri /favicon.ico
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb285310/initial] (3)
> applying pattern '^/oldsite/(.*)\.html' to uri '/favicon.ico'
> 192.168.9.20 - - [15/Apr/2011:13:39:58 --0400]
> [www.seconddomain.tld/sid#7f5feaeb4538][rid#7f5feb285310/initial] (1) pass
> through /favicon.ico
>
> Here is the server build information if that makes a difference:
>
> Server version: Apache/2.2.16 (Ubuntu)
> Server built:   Nov 18 2010 21:19:28
>
>
> -Original Message-
> From: "Eric Covener" [cove...@gmail.com]
> Date: 04/15/2011 10:09 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] mod_rewrite does not change URL in browser
>
> On Fri, Apr 15, 2011 at 1:02 PM, Jeff Shearer 
> wrote:
> > I am trying to move a set of documents from one directory to a new
> directory.  Currently users are redirected to the new directory but the old
> URL remains in the browser window.  My research indicates that if I change
> the PT flag to R I should be able to do what I want.  However, when I change
> the PT to an R, users are not actually redirected to the new directory.
>  Here is the VirtualHost configuration:
>
> Try specifying a complete protocol, hostname, etc for the substitution
> when you add the 'R' flag -- .e.g http://%{HTTP_HOST}/newsite/$1 [R]
>
>
> --
> Eric Covener
> cove...@gmail.com
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [us...@httpd] High load apache

2010-09-14 Thread Pablo Garcia Melga
Sorry Paras, I didn't catch it right ,  then the behavior is :

Database based (Performs Wrong)
Non Database based (perform good)
html files (performs good)
 is this right ?

Asuming this is the case, then you should check your database server
to see if you're seeing stress signs on it.

Also, if you really want to load-test your application, then you
should consider a more complex test, using jmeter or some other
testing tool, where you can create random waits and other test
artifacts.

Regards, Pablo

On Tue, Sep 14, 2010 at 5:22 PM, Paras pradhan  wrote:
> Just confirmed that the runtime wait is happening to all the database based
> and non database based php scripts and with plain html files it is fine.
> Ideas?
> Paras.
>
> On Tue, Sep 14, 2010 at 12:46 PM, Paras pradhan 
> wrote:
>>
>> Yes horde is based on PHP and Mysql. But the page I am hitting with ab is
>> just the login page and no database involved.
>> Paras.
>>
>> On Tue, Sep 14, 2010 at 12:43 PM, Pablo Garcia Melga 
>> wrote:
>>>
>>> I'm not familiar with Horde, does it run against a database server ?,
>>> based on the information you provided, there's seems to be something
>>> else preventing the apache to serve the requests on time.
>>>
>>>
>>> On Tue, Sep 14, 2010 at 2:19 PM, Paras pradhan 
>>> wrote:
>>> > Pablo,
>>> > Here the o/p:
>>> > command: ab -t 60 -c 100 https://domain/h/imp/login.php
>>> >
>>> > vmstat:
>>> > [r...@wmail /]# vmstat -S M 2 20
>>> > procs ---memory-- ---swap-- -io --system--
>>> > -cpu--
>>> >  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy
>>> > id
>>> > wa st
>>> > 40  0      0   7305    288   2259    0    0     0     3   14   11  2  1
>>> > 97
>>> >  0  0
>>> >  7  0      0   7301    288   2259    0    0     0     0 1785 15462 39
>>> > 15 46
>>> >  0  0
>>> > 47  0      0   7296    288   2259    0    0     0     0 1720 15032 40
>>> > 17 43
>>> >  0  0
>>> > 25  0      0   7297    288   2260    0    0     0    62 1656 15157 40
>>> > 15 45
>>> >  0  0
>>> >  7  0      0   7296    288   2260    0    0     0     0 1866 15701 40
>>> > 17 44
>>> >  0  0
>>> > 51  1      0   7293    288   2260    0    0     0    42 1862 16083 37
>>> > 14 44
>>> >  4  0
>>> >  1  0      0   7295    288   2260    0    0     0    12 1807 15293 42
>>> > 15 42
>>> >  0  0
>>> > 51  0      0   7298    288   2260    0    0     0     0 1797 16015 36
>>> > 14 50
>>> >  0  0
>>> > 14  1      0   7296    288   2260    0    0     0    54 1782 15001 42
>>> > 15 41
>>> >  2  0
>>> > 36  0      0   7293    288   2260    0    0     0   220 1728 14567 43
>>> > 16 37
>>> >  3  0
>>> > 17  0      0   7292    288   2260    0    0     0    42 1726 15443 40
>>> > 16 44
>>> >  0  0
>>> > 11  0      0   7296    288   2260    0    0     0    10 1844 15618 39
>>> > 14 46
>>> >  0  0
>>> >  9  0      0   7290    288   2260    0    0     0     0 1617 14694 41
>>> > 15 44
>>> >  0  0
>>> >  4  0      0   7291    288   2260    0    0     0    44 1632 14668 42
>>> > 15 43
>>> >  0  0
>>> >  7  0      0   7287    288   2260    0    0     0    16 1657 14941 38
>>> > 17 45
>>> >  0  0
>>> > 14  1      0   7287    288   2260    0    0     0    40 1751 15042 39
>>> > 17 41
>>> >  3  0
>>> > 43  0      0   7290    288   2260    0    0     0    12 1787 15635 38
>>> > 18 44
>>> >  0  0
>>> >  1  0      0   7288    288   2260    0    0     0     0 1675 14830 41
>>> > 17 42
>>> >  0  0
>>> > 44  0      0   7290    288   2260    0    0     0    44 1762 15691 33
>>> > 16 51
>>> >  0  0
>>> > 39  0      0   7288    288   2260    0    0     0    10 1666 14491 41
>>> > 18 40
>>> >  1  0
>>> >
>>> > Process waiting for run time (r) seems to be high. But don't know if it
>>> > is
>>> > normal with 100 concurrent users.
>>> > Thanks
>>> > Paras.
>>> >
>>> > On Mon, Sep 13, 2010 at 7:11 PM, Pablo Garcia Melga 
>>> > wrote

Re: [us...@httpd] High load apache

2010-09-14 Thread Pablo Garcia Melga
I'm not familiar with Horde, does it run against a database server ?,
based on the information you provided, there's seems to be something
else preventing the apache to serve the requests on time.


On Tue, Sep 14, 2010 at 2:19 PM, Paras pradhan  wrote:
> Pablo,
> Here the o/p:
> command: ab -t 60 -c 100 https://domain/h/imp/login.php
>
> vmstat:
> [r...@wmail /]# vmstat -S M 2 20
> procs ---memory-- ---swap-- -io --system--
> -cpu--
>  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id
> wa st
> 40  0      0   7305    288   2259    0    0     0     3   14   11  2  1 97
>  0  0
>  7  0      0   7301    288   2259    0    0     0     0 1785 15462 39 15 46
>  0  0
> 47  0      0   7296    288   2259    0    0     0     0 1720 15032 40 17 43
>  0  0
> 25  0      0   7297    288   2260    0    0     0    62 1656 15157 40 15 45
>  0  0
>  7  0      0   7296    288   2260    0    0     0     0 1866 15701 40 17 44
>  0  0
> 51  1      0   7293    288   2260    0    0     0    42 1862 16083 37 14 44
>  4  0
>  1  0      0   7295    288   2260    0    0     0    12 1807 15293 42 15 42
>  0  0
> 51  0      0   7298    288   2260    0    0     0     0 1797 16015 36 14 50
>  0  0
> 14  1      0   7296    288   2260    0    0     0    54 1782 15001 42 15 41
>  2  0
> 36  0      0   7293    288   2260    0    0     0   220 1728 14567 43 16 37
>  3  0
> 17  0      0   7292    288   2260    0    0     0    42 1726 15443 40 16 44
>  0  0
> 11  0      0   7296    288   2260    0    0     0    10 1844 15618 39 14 46
>  0  0
>  9  0      0   7290    288   2260    0    0     0     0 1617 14694 41 15 44
>  0  0
>  4  0      0   7291    288   2260    0    0     0    44 1632 14668 42 15 43
>  0  0
>  7  0      0   7287    288   2260    0    0     0    16 1657 14941 38 17 45
>  0  0
> 14  1      0   7287    288   2260    0    0     0    40 1751 15042 39 17 41
>  3  0
> 43  0      0   7290    288   2260    0    0     0    12 1787 15635 38 18 44
>  0  0
>  1  0      0   7288    288   2260    0    0     0     0 1675 14830 41 17 42
>  0  0
> 44  0      0   7290    288   2260    0    0     0    44 1762 15691 33 16 51
>  0  0
> 39  0      0   7288    288   2260    0    0     0    10 1666 14491 41 18 40
>  1  0
>
> Process waiting for run time (r) seems to be high. But don't know if it is
> normal with 100 concurrent users.
> Thanks
> Paras.
>
> On Mon, Sep 13, 2010 at 7:11 PM, Pablo Garcia Melga 
> wrote:
>>
>> Paras, have you checked the OS counters ?, is this completely CPU bound ?
>> would you post a "vmstat 2" run during the ab testing ?
>>
>> Regards, Pablo
>>
>> On Mon, Sep 13, 2010 at 7:28 PM, Paras pradhan 
>> wrote:
>> > I got almost the same result as yours with a small test php script. But
>> > with
>> > the login page of horde, I am getting a small number of requests
>> > processed.
>> > I am assuming my tuned apache is fine and its the bulky horde php
>> > scripts
>> > that are hitting me. But still looking around the solution.. I have
>> > memcached and eaccelerator in place but not seeing improvements.
>> >
>> > With small php script:
>> > nagarkot:~ ppradhan$ ab -t 10 -c 30 https://domain/test.php
>> > This is ApacheBench, Version 2.3 <$Revision: 655654 $>
>> > Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
>> > Licensed to The Apache Software Foundation, http://www.apache.org/
>> > Benchmarking hostname (be patient)
>> > Finished 4608 requests
>> >
>> > Server Software:        Apache/2.2.3
>> > Server Hostname:        hostname
>> > Server Port:            443
>> > SSL/TLS Protocol:       TLSv1/SSLv3,AES256-SHA,1024,256
>> > Document Path:          /test.php
>> > Document Length:        68 bytes
>> > Concurrency Level:      30
>> > Time taken for tests:   10.003 seconds
>> > Complete requests:      4608
>> > Failed requests:        0
>> > Write errors:           0
>> > Total transferred:      1107432 bytes
>> > HTML transferred:       313480 bytes
>> > Requests per second:    460.65 [#/sec] (mean)
>> > Time per request:       65.125 [ms] (mean)
>> > Time per request:       2.171 [ms] (mean, across all concurrent
>> > requests)
>> > Transfer rate:          108.11 [Kbytes/sec] received
>> > Connection Times (ms)
>> >               min  mean[+/-sd] median   max
>> > Connect:        8   30  33.3     26     406
>> > Processing:     5   35  21.4    

Re: [us...@httpd] High load apache

2010-09-13 Thread Pablo Garcia Melga
Paras, have you checked the OS counters ?, is this completely CPU bound ?
would you post a "vmstat 2" run during the ab testing ?

Regards, Pablo

On Mon, Sep 13, 2010 at 7:28 PM, Paras pradhan  wrote:
> I got almost the same result as yours with a small test php script. But with
> the login page of horde, I am getting a small number of requests processed.
> I am assuming my tuned apache is fine and its the bulky horde php scripts
> that are hitting me. But still looking around the solution.. I have
> memcached and eaccelerator in place but not seeing improvements.
>
> With small php script:
> nagarkot:~ ppradhan$ ab -t 10 -c 30 https://domain/test.php
> This is ApacheBench, Version 2.3 <$Revision: 655654 $>
> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
> Licensed to The Apache Software Foundation, http://www.apache.org/
> Benchmarking hostname (be patient)
> Finished 4608 requests
>
> Server Software:        Apache/2.2.3
> Server Hostname:        hostname
> Server Port:            443
> SSL/TLS Protocol:       TLSv1/SSLv3,AES256-SHA,1024,256
> Document Path:          /test.php
> Document Length:        68 bytes
> Concurrency Level:      30
> Time taken for tests:   10.003 seconds
> Complete requests:      4608
> Failed requests:        0
> Write errors:           0
> Total transferred:      1107432 bytes
> HTML transferred:       313480 bytes
> Requests per second:    460.65 [#/sec] (mean)
> Time per request:       65.125 [ms] (mean)
> Time per request:       2.171 [ms] (mean, across all concurrent requests)
> Transfer rate:          108.11 [Kbytes/sec] received
> Connection Times (ms)
>               min  mean[+/-sd] median   max
> Connect:        8   30  33.3     26     406
> Processing:     5   35  21.4     32     386
> Waiting:        5   30  20.4     27     383
> Total:         20   65  40.3     59     462
> Percentage of the requests served within a certain time (ms)
>   50%     59
>   66%     64
>   75%     69
>   80%     72
>   90%     81
>   95%     91
>   98%    154
>   99%    269
>  100%    462 (longest request)
>
>
> With horde:
>
> --
> nagarkot:~ ppradhan$ ab -t 10 -c 30 https://domain/h/imp/login.php
> This is ApacheBench, Version 2.3 <$Revision: 655654 $>
> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
> Licensed to The Apache Software Foundation, http://www.apache.org/
> Benchmarking hostname (be patient)
> Finished 28 requests
>
> Server Software:        Apache/2.2.3
> Server Hostname:       hostname
> Server Port:            443
> SSL/TLS Protocol:       TLSv1/SSLv3,AES256-SHA,1024,256
> Document Path:          /h/imp/login.php
> Document Length:        16808 bytes
> Concurrency Level:      30
> Time taken for tests:   10.057 seconds
> Complete requests:      28
> Failed requests:        0
> Write errors:           0
> Total transferred:      490644 bytes
> HTML transferred:       470624 bytes
> Requests per second:    2.78 [#/sec] (mean)
> Time per request:       10775.575 [ms] (mean)
> Time per request:       359.186 [ms] (mean, across all concurrent requests)
> Transfer rate:          47.64 [Kbytes/sec] received
> Connection Times (ms)
>               min  mean[+/-sd] median   max
> Connect:        9  213 220.9    269     867
> Processing:   660 3935 2707.5   3242    9787
> Waiting:      659 3934 2707.5   3241    9785
> Total:        926 4148 2762.9   3314   10056
> Percentage of the requests served within a certain time (ms)
>   50%   3314
>   66%   4803
>   75%   6077
>   80%   6369
>   90%   8963
>   95%   9699
>   98%  10056
>   99%  10056
>  100%  10056 (longest request)
>
>
> Thanks!
> Paras.
> On Mon, Sep 13, 2010 at 1:33 PM, John List  wrote:
>>
>> On 09/13/2010 12:41 PM, Paras pradhan wrote:
>>
>> John,
>> I am testing to support 300 requests / second. concurrent parameter in ab
>> does test number of Established tcp session per second if I am not mistaken.
>> Thanks
>> Paras.
>>
>> Sorry again, Paras. This time I erred in two ways: I said you were testing
>> at 300 connections per second. Actually, your -c parameter is 100 so you are
>> testing at 100 concurrent requests (not requests per second; the actual
>> number of requests per second is probably far higher).
>>
>> Suggestions:
>>
>> Post your complete ab results back here
>> You might want to run your test against a (non-encrypted) http url (as
>> well as the encrypted https url you are using) to see to see if  the
>> encryption process is a significant part of the processing time. (I'm
>> guessing it will be.)
>>
>> FWIW, I'm posting my own ab results below. I ran ab from my desktop
>> against a simple login screen on a webserver running on a dual-core laptop
>> on the same local network using a command of "ab -t 10 -c 30
>> http://192.168.1.3/Login.html";. As you can see, I was actually completing
>> 573 requests per second!:
>>
>> # ab -t 10 -c 30 http://192.168.1.3/Login.html
>> This is ApacheBench, Version 2.3 <$Revision: 655654 $>
>> Copyright 1996 Adam Twi

Re: [us...@httpd] Unable to conditionally set cache-control

2010-06-08 Thread Pablo Garcia Melga
Is the home.html an actual file or a Rewrite rule ?
Do you have the same problem with other files ? .js or .css ?

On Mon, Jun 7, 2010 at 9:05 PM,  wrote:

>  Please excuse my query as I’m new to apache and open source in general.
> I’m attempting to set the cache-control to no-cache by using the following
> statements within my httpd.conf:
>
>
>
> 
>
> Header unset ETag
>
> Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
>
> Header set Pragma "no-cache"
>
> Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
>
> 
>
>
>
> When I use the configuration above, I get the following unexpected response
> (home.html page):
>
>
>
> HTTP/1.1 200 OK
>
> Date: Mon, 07 Jun 2010 23:35:14 GMT
>
> Server: Apache/2.2.3 (Red Hat)
>
> Connection: close
>
> Transfer-Encoding: chunked
>
> Content-Type: text/html; charset=UTF-8
>
>
>
> If I remove the ‘FilesMatch’ conditional statement and use the following::
>
>
>
> Header unset ETag
>
> Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
>
> Header set Pragma "no-cache"
>
> Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
>
>
>
> I then get the expected results on the response (home.html page):
>
>
>
> HTTP/1.1 200 OK
>
> Date: Mon, 07 Jun 2010 23:43:04 GMT
>
> Server: Apache/2.2.3 (Red Hat)
>
> Cache-Control: max-age=0, no-cache, no-store, must-revalidate
>
> Pragma: no-cache
>
> Expires: Wed, 11 Jan 1984 05:00:00 GMT
>
> Connection: close
>
> Transfer-Encoding: chunked
>
> Content-Type: text/html; charset=UTF-8
>
>
>
> I have not been able to get the conditional ‘FilesMatch’ statement to
> work.  Any ideas what I may be doing wrong or may be missing?  Thanks in
> advance for your help.
>
>
>
> MJC
>
>
>
>
>
>
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
>
> Notice: This information is intended only for the person(s) or entity(ies) to 
> which it is addressed. This information may contain information that is 
> confidential or otherwise protected from disclosure. If you are not the 
> intended recipient of this message, or if this message has been addressed to 
> you in error, please immediately alert the sender by reply e-mail and then 
> delete this message, including any attachments. Any dissemination, 
> distribution or other use of the contents of this message by anyone other 
> than the intended recipient is strictly prohibited.
>


Re: [us...@httpd] Header modification problem with mod_rewrite, mod_headers and PHP

2010-05-20 Thread Pablo Garcia Melga
I've tried that also, did't worked either, There seems to be a bug
https://issues.apache.org/bugzilla/show_bug.cgi?id=49308, covering
this issue. But I don't know when it'll be fixed.

On Wed, May 19, 2010 at 7:31 PM, Igor Cicimov  wrote:
> Use mod_expires instead
>
> Sent from my phone
>
> On May 19, 2010 11:42 PM, "Pablo Garcia Melga"  wrote:
>
> Hello,
>
>  I'm struggling with a configuration that doesn't seems to work
> I have an httpd 2.2.15 running on RHEL 5.3 loaded with mod_rewrite,
> mod_headers, mod_expires and php
>
>
> I have configured this rewrite rule
> RewriteRule "/c([0-9]+)-([a-zA-Z/-]+)-p([0-9]+)(.*)"
> "/nl_listado.php?categoria=$1&pagina=$3"
>
> Works fine, no problem.
> Now I want to remove all cache-related headers sent by the php and set my
> own.
> So I put these lines in the config.
>
> 
> Header unset set-cookie
> Header unset Expires
> Header unset cache-control
> Header unset Pragma
> Header set cache-control "public"
> Header append cache-control "max-age=1200"
> 
> 
> Header unset set-cookie
> Header unset Expires
> Header unset cache-control
> Header unset Pragma
> Header set cache-control "public"
> Header append cache-control "max-age=1200"
> 
>
> Neither of these seems to work as expected, instead I get a mixed response.
>
> This are the response headers without the sections
>
> Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
> pre-check=0, no-cache
> Expires: -1
> Pragma: no-cache
>
> And this are the response headers after I place the above configuration.
>
> Cache-Control: public, max-age=1200, no-cache
> Expires: -1
> Pragma: no-cache
>
>
> I've tried with different versions of httpd, also compiling the
> modules statically, but I found no way to make this works.
> The weird thing is that the mod_headers kicks in and append the
> "public, max-age=1200" to the response, but doesn't remove the
> no-cache, Expires and Pragma headers.
> Any ideas ?
>
>
>
> Regards, Pablo
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[us...@httpd] Header modification problem with mod_rewrite, mod_headers and PHP

2010-05-19 Thread Pablo Garcia Melga
Hello,

 I'm struggling with a configuration that doesn't seems to work
I have an httpd 2.2.15 running on RHEL 5.3 loaded with mod_rewrite,
mod_headers, mod_expires and php


I have configured this rewrite rule
RewriteRule "/c([0-9]+)-([a-zA-Z/-]+)-p([0-9]+)(.*)"
"/nl_listado.php?categoria=$1&pagina=$3"

Works fine, no problem.
Now I want to remove all cache-related headers sent by the php and set my own.
So I put these lines in the config.


Header unset set-cookie
Header unset Expires
Header unset cache-control
Header unset Pragma
Header set cache-control "public"
Header append cache-control "max-age=1200"


Header unset set-cookie
Header unset Expires
Header unset cache-control
Header unset Pragma
Header set cache-control "public"
Header append cache-control "max-age=1200"


Neither of these seems to work as expected, instead I get a mixed response.

This are the response headers without the sections

Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0, no-cache
Expires: -1
Pragma: no-cache

And this are the response headers after I place the above configuration.

Cache-Control: public, max-age=1200, no-cache
Expires: -1
Pragma: no-cache


I've tried with different versions of httpd, also compiling the
modules statically, but I found no way to make this works.
The weird thing is that the mod_headers kicks in and append the
"public, max-age=1200" to the response, but doesn't remove the
no-cache, Expires and Pragma headers.
Any ideas ?



Regards, Pablo

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org