Services Hosting & Servers Tools Blog Search Company TürkçeTR
Get a Quote

            

Server blocks, static sites and reverse proxying

In Nginx, a server block (the equivalent of an Apache "virtual host") is a configuration unit defined with the server { ... } directive that handles requests matching a given server_name/listen combination. On Debian/Ubuntu-based systems these blocks are typically written as files under /etc/nginx/sites-available/, and only the ones symlinked into /etc/nginx/sites-enabled/ are actually active.

The difference between serving a static site and reverse proxying is how the request is fulfilled. In static mode, Nginx reads files directly from the directory specified by root and serves them via try_files — there is no application server in between. In reverse proxy mode, Nginx doesn't handle the request itself; it forwards it with proxy_pass to an application server running in the background (e.g. a Node.js/Express app listening on 127.0.0.1:3000) and relays the response back to the client. This lets Nginx take care of TLS termination, compression, static-asset caching and load balancing, separate from the application.

The line proxy_set_header X-Forwarded-Proto $scheme; matters in particular: even though Nginx talks to the client over HTTPS, it usually forwards the request to the backend as plain HTTP. Without this header, the application may think the request arrived unencrypted, which can prevent secure cookies from being set, cause it to generate http:// redirects instead of https://, or trigger mixed-content errors. Most frameworks (Express, Django, Rails, etc.) read this header to determine the request's real protocol — though the app side also needs a "trust proxy"-style setting enabled for it to take effect.

Once you've generated the config, save it as /etc/nginx/sites-available/<domain>, then enable it with sudo ln -s /etc/nginx/sites-available/<domain> /etc/nginx/sites-enabled/. Before going live, always test the syntax with sudo nginx -t; if it reports no errors, apply the change with sudo systemctl reload nginx (reload, not restart, reapplies the configuration without dropping active connections).

When should you use Nginx Server Block Generator?

The KEYDAL Nginx Server Block Generator tool is a browser-based utility that developers, system administrators, SEO specialists and enterprise technology teams use in their daily operations. It requires no installation, is free, and produces results instantly. It is designed so local teams can run audits without connecting to server environments and run analyses without touching production.

Typical scenarios include: post-migration verification, comparing domain or hosting providers, diagnosing customer issues, security auditing (pre-pentest reconnaissance), root-cause analysis of email deliverability problems, validating CDN or proxy configuration, surfacing technical audit data for SEO teams, and rapid information gathering during incident response. You can copy results as text and share them or paste them into internal documentation.

The KEYDAL infrastructure team provides web hosting, VPS, dedicated server management, server hardening, DNS configuration and SSL/TLS deployment services from Türkiye. Beyond these tools, we deliver server setup and operations support across Hetzner, OVHcloud, Contabo, DigitalOcean and Turkish providers.

Your queries are never stored on our servers

KEYDAL tools run stateless: domain names, IPs, URLs or other inputs are not persisted to any database. Logs are kept only for security purposes (rate limiting, abuse detection) and deleted within 30 days. For tools that handle sensitive data (tokens, API keys, JWTs), processing happens entirely in your browser — nothing is sent over the network. See our Privacy Policy for details.

All tools run over HTTPS with TLS 1.3 support. KEYDAL is a Türkiye-based technology company and complies fully with local data-protection regulations (KVKK) and GDPR principles.

You may also be looking for

The KEYDAL free tools collection includes DNS lookup, WHOIS lookup, SSL certificate checker, HTTP headers analyzer, IP geolocation, uptime checker, JSON formatter, JWT decoder, Base64 encode/decode, QR code generator, meta tag analyzer and robots.txt tester. All browser-based, free, no installation.

If you are comparing server prices, see our web hosting, VPS, VDS, cloud hosting, dedicated server and storage pages. See all tools →

WhatsApp