Nginx proxied to Apache (not standalone Nginx)

esalogica shared this idea 2 years ago
Planned

Install Nginx listening on port 80 as a proxy to Apache and permit to select on a per-domain basis to use Nginx to serve static content.

Best Answer
photo

We weren't able to get nginx added in v54 like we were hoping, and don't yet have an updated estimate for the delivery here. We're currently working to get EasyApache 4 stable and fully integrated, and then we'll work on adding features. Some of those features will include adding support for additional Webservers.

Comments (26)

photo
1

It is extremely unlikely that Nginx would be considered in a configuration where it is setup with a proxy to Apache. This increases complexity by a significant amount and presents unique problems that would not exist in a standalone configuration.

What is most likely, if Nginx is pursued as a feature for cPanel & WHM, would be for it to be included as a standalone daemon. This is like mentioned in this feature request:

http://features.cpanel.net/responses/as-a-server-administrator-i-want-standalone-nginx-supported-as-an-alternative-to-apache-so-that-i-can-offer-faster-speed-and-lower-load-on-smallers-servers

I would advise posting further comments and voting in that feature.

photo
3

I like the idea (ran out of votes).

I came from Plesk where I used the built-in nginx proxy with zero problems and great results and tried some proxy-plugins for WHM and had nothing but trouble.

Even .htaccess files worked great the way that Plesk did it.

And the by-domain setting would help with any odd problem coming up.

I would advise to catch up with Plesk in this regard.

photo
1

Varnish might be a better solution - there is a feature request for that.

photo
2

Brilliant that this is now been changed to planned, especially after the only comment originally from cPanel saying that it would be unlikely ! Any idea of timescale for this to be implemented ?

photo
2

Hi!

We haven't quite started on this yet, but it's currently planned to work on our first iteration of Nginx and caching during our 11.54 release cycle. Once we start working on it / get closer to that point, I'll be sure to keep this request updated :)

photo
1

Any update yet?

photo
2

There is no update yet. We're still working on abstracting the web server away from cPanel. We'll update this feature post when we get started.

photo
photo
1

We weren't able to get nginx added in v54 like we were hoping, and don't yet have an updated estimate for the delivery here. We're currently working to get EasyApache 4 stable and fully integrated, and then we'll work on adding features. Some of those features will include adding support for additional Webservers.

photo
1

That sounds like you are planning to add nginx as an Apache replacement.

This feature request is about using nginx as a reverse proxy [ mod note: removed external link ] - just with tight integration for domain selection and maybe even SSL support.

photo
1

Sorry about the confusion. We'll definitely be considering both approaches!

photo
1

@benny Just following up to see of there has been any movement on this now that EasyApache 4 has been released and were in version 58? Nginx as a proxy to apache would be brilliant to help speed things up

photo
1

Not yet specifically planned, but we're definitely getting more of the roadblocks out of the way, allowing us to actually get started on this. I'll let you know as soon as there's an update!

photo
photo
1

Meanwhile one can use Engintron! Now supports EA4.

photo
1

Just remember Engintron is awesome yes BUT it does not currently support SSL, so if you are using SSL Certs or even the free SSL provided by the new AutoSSL feature, engintron is pointless for you, unless you serve content via HTTP and not HTTPS

photo
1

Check https://www.tabaklaedeli.ch is under engintron, and runs just fine. As I said all SSL must be installed over Apache, and will work just fine. Since it's just proxying them.

photo
1

If you check the header information of your website - (Network tab of firefox console - probably same in chrome) you will see you site is actually served by apache, engintron (nginx) does nothing for you on an SSL site it will only serve regular unsecure traffic. There are various threads about this on engintrons github including one from me asking about SSL support

photo
photo
1

Sadly Engitron doesn't support TLS/SSL yet. It is planned though

photo
1

You dont need it, since it allows the Usage of current Apache SSL/TLS in place. So I use Engintron with many SSL sites and they work flawlessly.

photo
1

If not apachebooster will do the do ;)

photo
photo
2

Hi cPanel,

I was just wondering about this feature, when it is released into stable lines, will the nginx proxy support SSL and PHP-FPM or will SSL be handled solely by apache (like other plugins such as engintron mentioned in other comments)

The real bonus here will be to have nginx handle both

photo
1

Any update on this? It seems there were talks about adding this in v54 but we're now heading towards v64.

photo
1

No update, but as soon as there is one I'll be here!

photo
1

Is it planned for 64 or a later version?

photo
2

It's not yet assigned to a version, but as soon as we're aiming at a version I will update everyone here.

photo
photo
1

Have been using Engintron for 5 months now with SSL and it is brilliant. There is enough manual config too so you can tune your micro caching. I know the developer personally and he manages some high performing / high traffic sites and he is committed to performance and development. +1000

photo
1

I use own Python script https://github.com/partizanes/ApacheToNginxHttpsCpanel/blob/master/s6/compareHttpsHosts.py for avtomatic generation nginx config file with all ssl certificate, direct static , http2 support.

The script check if apache config changed and generate new nginx.conf. This file need to include to main nginx config.

"include /etc/nginx/conf.d/*.conf;"