Knowledge Base

Server Examples

Short configurations for common response-producing layers. Adapt each example to the application and inspect the final public response after deployment.

Choose the relevant layer

Apache rules may belong in an allowed .htaccess file or a virtual host. Nginx and Caddy require access to their server configuration. PHP examples cover dynamic PHP responses. On shared hosting, use the layer your hosting plan lets you control.

These examples demonstrate small, explained settings. They do not certify a website or supply a universal CSP, CORS, or caching policy. A CDN or hosting proxy may alter the result.

Configuration examples

Apache Header Examples

Apache mod_headers can set response headers in server configuration or an allowed .htaccess file. These examples show a small baseline, not a complete security policy.

Nginx Header Examples

Nginx add_header behavior depends on response status and configuration inheritance. Check the relevant server and location blocks together.

Caddy Header Examples

Caddy can manage response headers through a Caddyfile header directive. Keep each rule close to the response type it is meant to control.

PHP Response Header Examples

PHP can set headers for responses it generates. Send them before output, and remember that the server or CDN can still change what the visitor receives.

LiteSpeed Header Examples

LiteSpeed Enterprise can use supported Apache-style header rules. OpenLiteSpeed has its own context controls, so identify the product before configuring it.

Cloudflare Header Examples

Cloudflare response header rules change what visitors receive. Keep those transformations separate from rules that control Cloudflare caching.

Copyright ©2026 MILAN INNOVATIONS LLC. All rights reserved.