You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by thomas Armstrong <ta...@gmail.com> on 2008/03/31 11:52:58 UTC

[users@httpd] Apache 2.2 as a static server (without PHP) to serve images

Hi.

I've got Apache 2.2 with PHP running on my Linux box to serve dynamic pages.

I was told that Apache 2.2 allows to create a secondary process which
doesn't use PHP to serve images or static files without installing a
secondary Apcache webserver or lighttpd.

Is it possible? How can I configure my Apache? Thank you very much.

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


AW: [users@httpd] Apache 2.2 as a static server (without PHP) to serve images

Posted by ch...@post.ch.
Hi Thomas,

A typical setup for your environment would be to set an apache  reverse proxy in front and
handle the dynamic content on a dedicated backend server. You can put your static
files on your reverse proxy or serve them via another backend server.
The important part is to split dynamic and static content, just like you intend to do.

Putting all static content on the same physical machine, but on a different Apache
running on a different port sounds like a lousy setup to me. Consider clients
trying to access your service but their firewall blocks outgoing requests to anything
but port 80 and 443.

regs,

Christian

-----Ursprüngliche Nachricht-----
Von: thomas Armstrong [mailto:tarmstrong@gmail.com] 
Gesendet: Montag, 31. März 2008 12:46
An: users@httpd.apache.org
Betreff: Re: [users@httpd] Apache 2.2 as a static server (without PHP) to serve images


>  Sure, make a copy of the httpd.conf file, remove everything that 
> refers  PHP (the LoadModule basically), then run a secondary Apache 
> using that  config file. You'll have to use a different port of course 
> and redirect  images and the like to the secondary apache.
>
>  But... why?

Thank you very much for your answer.

AFAIK, when Apache answers a petition of dynamic content, it requires 10-20 MB. If you request for an image, then this 20MB process is serving static content inefficiently,  which could be served just by a 1MB process.

So I want to run another Apache with less memory requirements to serve these static contents.

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


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


Re: [users@httpd] Apache 2.2 as a static server (without PHP) to serve images

Posted by thomas Armstrong <ta...@gmail.com>.
>  Sure, make a copy of the httpd.conf file, remove everything that refers
>  PHP (the LoadModule basically), then run a secondary Apache using that
>  config file. You'll have to use a different port of course and redirect
>  images and the like to the secondary apache.
>
>  But... why?

Thank you very much for your answer.

AFAIK, when Apache answers a petition of dynamic content, it requires
10-20 MB. If you request for an image, then this 20MB process is
serving static content inefficiently,  which could be served just by a
1MB process.

So I want to run another Apache with less memory requirements to serve
these static contents.

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


Re: [users@httpd] Apache 2.2 as a static server (without PHP) to serve images

Posted by Davide Bianchi <da...@onlyforfun.net>.
thomas Armstrong wrote:
> I was told that Apache 2.2 allows to create a secondary process which
> doesn't use PHP to serve images or static files without installing a
> secondary Apcache webserver or lighttpd.

Sure, make a copy of the httpd.conf file, remove everything that refers 
PHP (the LoadModule basically), then run a secondary Apache using that 
config file. You'll have to use a different port of course and redirect 
images and the like to the secondary apache.

But... why?

Davide

-- 
Ever noticed how fast Windows runs?  Neither did I!

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