# Nginx as reverse-proxy for apache inside a VM

**URL:** <https://www.ruby-forum.com/t/nginx-as-reverse-proxy-for-apache-inside-a-vm/238831>\
**Category:** NGINX\
**Created:** [January 30, 2014, 2:41pm UTC](https://www.ruby-forum.com/t/nginx-as-reverse-proxy-for-apache-inside-a-vm/238831 "2014-01-30T14:41:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [January 30, 2014, 2:41pm UTC](https://www.ruby-forum.com/t/nginx-as-reverse-proxy-for-apache-inside-a-vm/238831/1 "2014-01-30T14:41:23Z")

</div>

Hi,

I really don’t know to solve this:

> **[\[nginx + apache\]](https://forum.proxmox.com/threads/nginx-apache.17680/)**
>
> hi,
> 
> i can't running nginx as reverse proxy for apache on proxmox
> 
> i got a 502 bad gateway error and
> 
> connect() failed (111: Connection refused) while connecting to upstream, client: xxx, server: www.domain, request: "GET / HTTP/1.1", upstream:...

I got a 504 Gateway time-out error

I use proxmox as hypervisor, inside a CT, i want to use nginx as reverse  
proxy for static content

I got apache listen on port 8080 and nginx on 80, when i browse my url,  
i  
got a 504 gateway time-out

I’m lost…

thank you for your help

++

Posted at Nginx Forum:

> **[nginx as reverse-proxy for apache inside a VM](https://forum.nginx.org/read.php?2,247002,247002#msg-247002)**
>
> Hi, I really don't know to solve this: http://forum.proxmox.com/threads/17680-nginx-apache I got a 504 Gateway time-out error I use proxmox as hypervisor, inside a CT, i want to use nginx as reverse proxy for static content I got apache lis
