Reverse Proxy Nginx and Apache

dobro385

New member
Joined
May 5, 2013
Messages
1
Hello Directadmin,

I purchased two days ago a VServer to setup a Reverse Proxy (nginx) on the Server. I want to protect my Backend Server (Dedicated Server).
Everything is working, except the Domain is not forwarding to the right folder. The VServer is forwarding to the Backend Server.

I changed via A records the IP Address for one of my domains. After im gonna Visit the Domain, i get this "Apache is functioning normally" instead of the Content.

These are my configs for nginx.

default
server
{
listen 80;
server_name .localhost;

error_log /dev/null;
access_log /dev/null;

location /
{
proxy_pass http://37.221.163.218/;
proxy_redirect default;
}
}

proxy
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_max_temp_file_size 0;

proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;

proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;

I wrote an Email to the Directadmin Support, and got this as answer. But still, i dont know how to fix it. Can someone try to help me? Thank you.

a10MB.png
 
Hello,

If the issue is still not resolved, feel free to PM me, and I will be glad to fix it for you.
 
Why DA dosen't support nginx as proxy.
I think so DA should support nginx as reverse proxy. Standalone nginx is not so usefully. I'm pretty sure so most of DA user (server administrators) have many accounts on server and most people use script with .htaccess. Use standalone nginx does not make sense. I'm pretty sure that most will agree with me.

It's possible so DA will be support nginx as reverse proxy?

Regards
 
Probably sometime later they will. So you should either hope and wait or use it as a custom installation (by the way I could help you with it, and some other guys here for a fee).
 
I started to implement that to CB 2.0 :) We've got a lot of requests for that. However, please don't expect a stable release of apache+nginx (as reverse proxy) soon. Early alpha should be available soon. It will be using mod_aclr2 and mod_remoteip.
 
It will be using mod_aclr2 and mod_remoteip.
That's great news :).
Even better if you can include Varnish and let us configure routes based on vhost :)

Modern app, also works w/SSL:
Code:
Nginx -> PHP-FPM
Non-SSL app which needs Apache:
Code:
Nginx -> Varnish -> Apache -> PHP-FPM
SSL app which needs Apache:
Code:
Nginx -> Apache -> PHP-FPM
 
I started to implement that to CB 2.0 :) We've got a lot of requests for that. However, please don't expect a stable release of apache+nginx (as reverse proxy) soon. Early alpha should be available soon. It will be using mod_aclr2 and mod_remoteip.

How far are you with Apache + Nginx as reverse proxy? I would love to see this in custombuild, it would help a lot to decrease server load..
 
It's already in CustomBuild 2.0, however, the feature is new, so it's recommended to use latest DA pre-release binaries and files1.directadmin.com downloadserver in the options.conf file of CustomBuild for new features, to get bugfixes as fast as possible, if there are any.
 
Back
Top