Re: [Hampshire] Apache performance tuning.

Top Page
Author: David Ramsden
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Apache performance tuning.

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x56d8d100.hantslug.org.uk.10027': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Thu Jan 8 01:26:29 2009 GMT
gpg: using DSA key B15F69BD3454B217
gpg: Can't check signature: No public key
Steve Kemp wrote:
[snip]
>
>> But could mod_rewrite help here? Rewrite the URL to be img.domain.com,
>> for any images at a certain location (i.e. /forums/customavatars/)?
>> Would using mod_rewrite negate the benefits of using pound+ngnix to
>> serve the image content?
>
> It could, but I think that any gain would be spoiled by the connect,
> redirect, re-request cycle.


I've been reading through the squid documentation for the HTTP
accelerator as this does sound like a good idea, as previously
mentioned. It discusses the ability to direct requests to different
backend web servers, using a urlpath_regex and an ACL.

So I could run Apache for content and ngnix for serving images. The
relevant parts from the squid config would look something like:

cache_peer 127.0.0.1 parent 80 0 no-query originserver name=main_server
cache_peer 127.0.0.1 parent 81 0 no-query originserver name=image_server
acl images urlpath_regex ^/images
cache_peer_access image_server allow images
cache_peer_access main_server deny images
cache_peer_access main_server allow all

This works around using mod_rewrite and then the connect, redirect,
re-request cycle. Once again, in your opinion would this be of any
benefit or is it hard to say?

>
> Since I learned from your later message that you're using Plesk
> I think that most of the suggestions are either going to be impractical
> or cause you future pain. You have my sympathies.
>

[snip]

Thanks :) As previously mentioned, the owner of the server isn't very
confident with Linux and has so far managed to get by using Plesk. At
the moment, he doesn't want to change this. I have warned that by making
manual changes Plesk may not understand the configs. We've already
changed httpd.conf and re-written it with an experimental config and
Plesk still appears to be functioning. It only seems to write to a
config file within /etc/httpd/conf.d/ containing some of the vhost
configuration.

But I have my doubts too.

Once again, thanks for your input.
David.
-- 
 .''`.     David Ramsden
: :'  :    http://0wned.it/
`. `'`     PGP key ID: 3454B217 on wwwkeys.eu.pgp.net
  `-  Debian - Because it works (tm).