Welcome! Log In Create A New Profile

Advanced

Nginx to Apache Reverse Proxy Problem

Posted by TheUKCrazyhorse 
Nginx to Apache Reverse Proxy Problem
June 11, 2014 05:15AM
Hi there - hoping someone here can help me? I'm fairly new to Linux/nginx and having some problems getting reverse proxy to work.

Currently I'm running 3 virtual Ubuntu servers on an ESXi host at home - a webserver (nginx), a mail server (iRedMail) and a file server.

I have my own web domain - www.example.com - which is hosted on the nginx server. When I installed iRedMail, it automatically installed Apache and Roundcube as part of the process. I'd like to be able use a subdomain - mail.example.com - to access Roundcube externally, using reverse proxy.

I added the following into nginx (the mail server running Apache is on 192.168.0.13);

server {
listen 80;
server_name mail.example.com;

location / {
proxy_pass http://192.168.013;
}
}

With this, if I'm sitting on the internal network, mail.example.com takes me to the Roundcube login page. Externally though, it doesn't work. I've obviously missed something out, or done something incorrect, but I can't seem to find a straight answer on the subject using Google.

Any help here would be really appreciated - and obviously if I've missed any details out here that may help, feel free to ask any questions.

Thanks
Re: Nginx to Apache Reverse Proxy Problem
June 11, 2014 05:22AM
For this you need to setup a dns wildcard;

*.domain.com A 123.4.5.6
Re: Nginx to Apache Reverse Proxy Problem
June 11, 2014 05:31AM
Thanks for the quick response. I'm in work just now, but I'll give this a try when I get home later on. Thanks again!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 144
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready