Do I need nginx on origin server?

I have (I think) a typical setup for my origin server: code executor serving http on port 8000 with nginx acting as reverse proxy with Cloudflare making authenticated origin pulls.

I understand nginx is great at serving static files, but besides that, is there any point in having nginx acting as reverse proxy on my server or is my code executor alone sufficient?

To further clarify, obviously, Cloudflare acts as a reverse proxy anyway & my server hosts a single site.

NGINX is also routing your 443 connection over to Port 8000 of code executor.

This sounds similar to the Ghost blog setup. Because I use Cloudflare Tunnel, I’ve set my ingress rule to connect to Port 2369 (or whatever that Ghost instance uses), thus bypassing a local reverse proxy.

https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/configuration/configuration-file/ingress#matching-traffic

Hi there. Thanks for that!

I guess the main question I’d have for you is, has your setup, in any way, inconvenienced you? Are there any cons? Say, has it in any way impacted performance or security? I can’t think of any scenarios where it would (ignoring static file serving).

No drawbacks, and only advantages. Plus, mine (Ghost) is not even static files. If your site is static files, even better. You can use Cache Everything in a Page Rule and really speed things up.

Cloudflare tunnel is more efficient, plus it allows me to completely block off inbound requests, making it that much more secure.

Most of the things I can think of that one would want to configure with NGINX can be configured here: Caching and Headers. No need for SSL when using a Tunnel, either. You can still use Full (Strict), as I do with my Ghost sites.

1 Like

Hm… Very interesting… Thank you very much! I’ll look into this.

1 Like

I have checked with loader.io sending 10000 request per second through tunnel to my site and it works with no problem. I even use this with woocommerce

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.