# Nginx for images (apache for pages)

**URL:** <https://www.ruby-forum.com/t/nginx-for-images-apache-for-pages/227227>\
**Category:** NGINX\
**Created:** [March 7, 2013, 9:50pm UTC](https://www.ruby-forum.com/t/nginx-for-images-apache-for-pages/227227 "2013-03-07T21:50:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 7, 2013, 9:50pm UTC](https://www.ruby-forum.com/t/nginx-for-images-apache-for-pages/227227/1 "2013-03-07T21:50:41Z")

</div>

I’m serving images and dynamic .html pages via apache on port 80. I’d  
like to have nginx to serve the images. How can this be done since  
both apache and nginx need to serve requests on port 80?

- Grant

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 7, 2013, 9:54pm UTC](https://www.ruby-forum.com/t/nginx-for-images-apache-for-pages/227227/2 "2013-03-07T21:54:47Z")

</div>

On Thu, 2013-03-07 at 12:49 -0800, Grant wrote:

> I’m serving images and dynamic .html pages via apache on port 80. I’d  
> like to have nginx to serve the images. How can this be done since  
> both apache and nginx need to serve requests on port 80?
> 
> - Grant

Set apache up as a proxy server for dynamic html behind the nginx  
server.

(Or do like I do, and drop apache completely (: ).

Cheers,

Steve

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 7, 2013, 10:29pm UTC](https://www.ruby-forum.com/t/nginx-for-images-apache-for-pages/227227/3 "2013-03-07T22:29:17Z")

</div>

> > I’m serving images and dynamic .html pages via apache on port 80. I’d  
> > like to have nginx to serve the images. How can this be done since  
> > both apache and nginx need to serve requests on port 80?
> > 
> > - Grant
> 
> Set apache up as a proxy server for dynamic html behind the nginx  
> server.

Is there a good howto for this? Is it difficult when dealing with an  
ecommerce site?

- Grant

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 9, 2013, 10:02am UTC](https://www.ruby-forum.com/t/nginx-for-images-apache-for-pages/227227/4 "2013-03-09T10:02:43Z")

</div>

nice tutorial!

didnt you found anything approbiate here?

> **[Getting Started | NGINX](https://www.nginx.com/resources/wiki/start/)**
>
> Useful tools, examples, and other learning resources for getting started with NGINX.

regards, mex

Posted at Nginx Forum:

> **[Re: nginx for images (apache for pages)](https://forum.nginx.org/read.php?2,237099,237151#msg-237151)**
>
> I'm serving images and dynamic .html pages via apache on port 80. I'd like to have nginx to serve the images. How can this be done since both apache and nginx need to serve requests on port 80? - Grant \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_...

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 9, 2013, 8:54pm UTC](https://www.ruby-forum.com/t/nginx-for-images-apache-for-pages/227227/5 "2013-03-09T20:54:59Z")

</div>

> nice tutorial!
> 
> didnt you found anything approbiate here?  
> [GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub](http://wiki.nginx.org/Configuration)

I tried some of those but nothing seemed to match my situation as  
clearly as the one I used.

> **[Apache and Nginx Together | KBeezie](https://kbeezie.com/apache-with-nginx)**
>
> This article is basically food-for-thought for those who wish to use Nginx either side-by-side or in front of the Apache (httpd) HTTP Server. Within covers tweaking the two to work with each other as well as some configuration scenarios.

- Grant

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 8, 2013, 7:33am UTC](https://www.ruby-forum.com/t/nginx-for-images-apache-for-pages/227227/6 "2013-03-08T07:33:55Z")

</div>

> ecommerce site?
> 
> - Grant

What a fine little server. This howto was perfect:

> **[Apache and Nginx Together | KBeezie](https://kbeezie.com/apache-with-nginx)**
>
> This article is basically food-for-thought for those who wish to use Nginx either side-by-side or in front of the Apache (httpd) HTTP Server. Within covers tweaking the two to work with each other as well as some configuration scenarios.

The ecommerce factor was a breeze. Slightly different SSL certificate  
handling.

- Grant
