What is a Reverse Proxy?

A reverse proxy sits between your visitors and your server, handling requests and improving security and performance. CloudSonic uses Nginx as a reverse proxy on every server by default.

CloudSonic
CloudSonic
Last Updated September 10, 2026

TL;DR Reverse Proxy

A reverse proxy is a server that sits between your visitors and your origin server, intercepting incoming requests and forwarding them on your behalf. From the visitor's perspective they are simply accessing your website. Behind the scenes the reverse proxy handles the heavy lifting, including SSL termination, request routing, caching, compression, and security filtering. Reverse proxies are one of the most important components in modern web infrastructure because they add a layer of abstraction that makes sites faster and more secure without requiring changes to the application itself. Nginx functions as a reverse proxy on every CloudSonic server, sitting in front of PHP and handling all incoming HTTP requests before passing them to the application layer. It also works in combination with Cloudflare Enterprise, which acts as a reverse proxy at the network edge before traffic even reaches your server.

How a Reverse Proxy Works

A reverse proxy receives incoming requests from clients and forwards them to one or more backend servers on their behalf. The client only ever communicates with the reverse proxy and has no direct connection to or knowledge of the backend servers. The reverse proxy then receives the response from the backend server and passes it back to the client. This indirection creates several useful capabilities. The reverse proxy can cache responses and serve them to future clients without involving the backend server at all. It can distribute requests across multiple backend servers for load balancing. It can handle SSL termination, decrypting incoming HTTPS traffic and passing unencrypted requests to the backend, which reduces the computational load on application servers. It can also filter malicious requests before they reach the application, acting as the first line of defence alongside a WAF.

Why a Reverse Proxy Matters for Your Website

Running your application directly exposed to the internet without a reverse proxy means your application server handles every concern simultaneously: SSL termination, static file serving, compression, security filtering, and application logic. This is inefficient and insecure. A reverse proxy like Nginx takes over the concerns that do not require application logic, serving static files at high speed directly from disk without invoking PHP, handling SSL termination so the application server only deals with unencrypted traffic internally, compressing responses before sending them to clients, and caching rendered output so repeat requests never reach the application at all. This division of responsibility makes the overall system significantly faster and more efficient. It also adds a security layer because the application server is never directly accessible from the internet. Any request that reaches the application has already been filtered by the reverse proxy and, in CloudSonic's case, by Cloudflare Enterprise at the network edge before that.

Frequently Asked Questions on Reverse Proxy

What is the difference between a forward proxy and a reverse proxy?

A forward proxy sits between a client and the internet, making requests on behalf of the client. It is used to anonymise traffic, bypass geographic restrictions, or filter outbound requests in corporate networks. A reverse proxy sits between the internet and a server, receiving requests on behalf of the server. It is used to improve performance, security, and scalability of web applications. When people say proxy in a web hosting context they almost always mean reverse proxy.

Does Cloudflare act as a reverse proxy for my CloudSonic site?

Yes. When traffic hits your domain it first passes through Cloudflare's network which acts as a reverse proxy at the network edge, handling DDoS protection, WAF filtering, CDN delivery, and SSL termination before the request reaches your CloudSonic server. On the server itself, Nginx then acts as a second reverse proxy layer, routing requests to PHP-FPM and serving cached responses where available.

Can I see the real visitor IP addresses with a reverse proxy in place?

Without specific configuration, your server would see only the IP address of the reverse proxy rather than the real visitor IP. CloudSonic's Nginx configuration includes Cloudflare real IP restoration, which reads the CF-Connecting-IP header that Cloudflare adds to every request and substitutes it for the proxy IP. This means your access logs, WordPress, and any security plugins see the genuine visitor IP addresses.