Enable Brotli in the web server that terminates HTTP: install a compatible NGINX Brotli module or Apache’s mod_brotli, restrict compression to text responses, validate the configuration, reload the service, and verify that clients receive Content-Encoding: br. Brotli is not a VPS-wide switch; it is a server-module configuration, and runtime compression uses CPU.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
What Brotli compression does on a VPS
Brotli is a lossless compression format for HTTP responses. The web server compresses eligible content before sending it, while the browser advertises support with the Accept-Encoding request header. When negotiation succeeds, the response should include Content-Encoding: br. A client that does not advertise Brotli must receive an uncompressed response or another encoding the server supports.
As an Amazon Associate I earn from qualifying purchases.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Compression is generally appropriate for text-like payloads such as HTML, CSS, JavaScript, JSON, XML, SVG and plain text. JPEG, PNG, GIF, WebP, video, ZIP and other already-compressed formats normally gain little and consume CPU when compressed again. Brotli therefore needs an explicit server configuration rather than a blanket “compress everything” setting.
The exact steps depend on whether the VPS runs NGINX or Apache HTTP Server:
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
| Server | Required component | Configuration model | Reload check |
|---|---|---|---|
| NGINX | A Brotli filter module; a static module is optional for pre-compressed files | load_module in the main context, then brotli directives in http, server or location |
nginx -t, then nginx -s reload |
| Apache HTTP Server | mod_brotli (available in Apache 2.4.26 and later) |
AddOutputFilterByType BROTLI_COMPRESS for selected MIME types, or broader SetOutputFilter scope with exclusions |
Use the platform’s Apache configuration test and graceful reload procedure |
Before changing production settings, identify the distribution, web server, and configuration layout, and make sure you can restore the previous file. Package names and module paths vary between distributions and between vendor builds.
Enable Brotli in NGINX
1. Install a module that matches your NGINX build
Stock distribution repositories do not all ship the same Brotli package. Install a module compiled for the NGINX version and ABI on the VPS; do not copy a shared object from an unrelated server. F5’s NGINX Plus documentation uses the package name nginx-plus-module-brotli and shows this Debian/Ubuntu command:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
sudo apt update
sudo apt install nginx-plus-module-brotli
RHEL-family systems use the corresponding yum or dnf package workflow. The package must provide the HTTP Brotli filter module. If you also intend to serve files that were compressed during a build, install the package’s static-module component as well, when supplied separately.
After installation, locate the module files and confirm that their paths match the directives you will add. A module built for another NGINX release can prevent the service from starting, so treat an “incompatible version” or “module is not binary compatible” message as a packaging problem rather than a syntax problem.
2. Load the filter and optional static modules
Put dynamic-module directives in the main context of nginx.conf, before the http block. The documented module names are:
load_module modules/ngx_http_brotli_filter_module.so;
load_module modules/ngx_http_brotli_static_module.so;
The filter module performs compression at request time. The static module is only needed when NGINX should serve a matching pre-compressed file, such as app.js.br, instead of recompressing the original file.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Some packages install modules in a distribution-specific directory. In that case, use the absolute or package-provided path rather than the example relative path. Do not add a load_module line if your vendor build already compiles Brotli into NGINX or loads it from an included module file; duplicate loading causes an error.
3. Turn on compression and select MIME types
Inside the http, server or location context, add:
brotli on;
brotli_types text/plain text/css application/javascript application/json application/xml image/svg+xml;
The Google ngx_brotli documentation states that text/html is always compressed and that brotli_types adds MIME types. The list above therefore extends compression to common text formats; it does not mean every response will be compressed. The response’s actual Content-Type, the client’s Accept-Encoding header, cache behavior and other server rules still determine the result.
Keep the list deliberately narrow at first. Add a type only when it is genuinely text-based and you have checked that the application does not already encode or stream it in a way that makes compression unsuitable. Do not add image, archive or video MIME types merely because they are common files.
4. Decide whether to serve pre-compressed files
If the deployment process creates files such as main.css.br and main.js.br alongside their originals, enable the static module and add:
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →brotli_static on;
Use this only when the matching .br files are reliably generated, deployed and kept in sync with the originals. A missing or stale sidecar file can produce an unexpected result. If assets are not pre-compressed, leave brotli_static off and let the filter module compress eligible responses dynamically.
5. Test the configuration and reload NGINX
Run the syntax test before touching live workers:
nginx -t
Proceed only when the command reports a successful configuration test. Then perform a graceful reload:
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
nginx -s reload
Watch the service and error logs immediately afterward. Module-load failures, an incorrect shared-object path, duplicate loading and directives placed in the wrong context are common reasons for a failed reload. If the test fails, restore the previous configuration, correct the reported line or module package, and test again before reloading.
Enable Brotli in Apache HTTP Server
1. Confirm the Apache version and module
Apache HTTP Server 2.4.26 and later provide mod_brotli. The Apache Software Foundation describes it as the module that supplies the BROTLI_COMPRESS output filter, allowing server output to be compressed in Brotli before it is sent over the network.
Enable the module using the mechanism supplied by the VPS distribution or Apache build, and confirm that the running service has loaded it. Package names and module-loading files differ by operating system, so use the module package and include structure shipped for that installation rather than copying a directive from a different layout.
2. Compress selected text responses
For Apache 2.4.26 and newer, the documented MIME-type approach is:
AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/javascript application/json
This keeps the filter attached to the listed text-oriented content types. Add other text formats only after checking the application response headers. The directive can be placed in the server or virtual-host configuration, and in contexts permitted by the installation’s override policy.
3. Use broad filtering only with exclusions
Apache also documents a broad form:
SetOutputFilter BROTLI_COMPRESS
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-brotli
SetOutputFilter applies the filter more widely, so exclusions become your responsibility. The example excludes common raster images, but a production policy should also avoid archives, video and any other formats that are already compressed or are unsuitable for on-the-fly processing. Restricting the filter by MIME type is usually easier to audit than applying it globally and maintaining an ever-growing exclusion list.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
4. Reload safely
Run the Apache configuration test supplied by your distribution, correct every error it reports, and then perform a graceful reload through the service manager or Apache’s supported reload command. Check the error log for module-load failures and verify the virtual host that actually serves the test URL; editing an unused configuration file will not change the response.
Dynamic compression versus pre-compressed assets
Dynamic compression is convenient: the server receives the original response, compresses it and sends it when a client requests it. That work is repeated for subsequent requests unless another cache layer stores the encoded representation. Apache’s documentation warns that mod_brotli recompresses content each time a request is made, so pre-compressing content can provide a performance benefit by avoiding repeated compression work.
Pre-compression moves the CPU cost to the build or deployment stage. It is a strong fit for versioned, immutable CSS, JavaScript, SVG and other static assets. The server must select the .br representation only for clients that advertise Brotli and must preserve the correct response metadata:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesContent-Encoding: bridentifies the representation sent on the wire.Vary: Accept-Encodingtells shared caches that the response differs according to the client’s encoding support.- The uncompressed original or another supported encoding remains available for clients that do not send
Accept-Encoding: br.
Apache’s pre-compression example explicitly appends Vary Accept-Encoding. Apply the same cache principle when implementing an equivalent NGINX or CDN rule. Purge or invalidate stale representations when an asset is replaced, especially if the URL is not content-hashed.
Verify that the VPS returns Brotli
Test a known text response, not an image or archive. The following request asks for headers while advertising Brotli support:
curl -I -H 'Accept-Encoding: br' https://example.com/asset.css
For a compressible response, look for:
Content-Encoding: br.Vary: Accept-Encodingwhen a shared cache can store the response.- A text-oriented
Content-Type, such astext/cssorapplication/javascript.
A successful response without Content-Encoding: br is not automatically a fault. The URL may return a type you did not enable, the request may have been handled by a different virtual host, a CDN may have supplied a cached variant, or the module may not be loaded.
Best Value
Run a control request without Brotli support:
curl -I https://example.com/asset.css
The server should return an uncompressed representation or a fallback encoding that the client requested. If it still returns Content-Encoding: br, inspect an intermediary cache and the request headers; a shared cache that ignores Vary can deliver the wrong representation.
After testing, review NGINX or Apache logs for syntax, module-load, permission and upstream errors. Test both a static asset and a dynamic HTML or JSON endpoint if your policy covers both, because separate locations and virtual hosts can have different directives.
Troubleshoot the common failure modes
The configuration test says the Brotli directive is unknown
- Verify that the filter module package is installed for the running NGINX build, or that Apache’s
mod_brotliis enabled. - For NGINX, check that the
load_moduleline is in the main context and points to an existing, ABI-compatible shared object. - Confirm that you edited the configuration file actually included by the service.
The module loads, but the response is not Brotli-encoded
- Check the response’s
Content-Typeagainstbrotli_typesor Apache’sAddOutputFilterByTypelist. - Confirm the client sent
Accept-Encoding: br. - Check for a more specific
location, virtual-host rule, proxy response or CDN cache that bypasses the compression setting. - Make sure the reload completed successfully and that the worker processes use the new configuration.
Pre-compressed files are ignored or served incorrectly
- On NGINX, verify that the static module is loaded and
brotli_static on;is in the scope handling the asset. - Confirm the sidecar filename matches the requested original exactly and is present on the active server.
- Ensure the response sends
Content-Encoding: brand that caches vary onAccept-Encoding. - Remove stale sidecars during deployment so an old compressed file cannot outlive its source.
CPU use rises after enabling compression
Runtime compression consumes CPU, and the cost depends on response size, request rate, compression settings and the VPS’s available cores. Start with static text assets and ordinary responses, measure CPU and latency in your own workload, and move high-traffic immutable assets to build-time pre-compression where practical. No universal compression-ratio or latency percentage applies to every VPS.
Security: account for BREACH-style exposure
Apache’s documentation warns that some web applications are vulnerable to information-disclosure attacks when a TLS connection carries compressed data. This class of issue is commonly associated with BREACH-style attacks: an attacker observes compressed response sizes while influencing reflected input and may infer a secret embedded in the response.
Do not treat Brotli as harmless merely because it is newer than another compression format. Review pages that combine compression, TLS, attacker-controlled input and secrets such as CSRF tokens, session identifiers or other sensitive values. A cautious rollout starts with static assets and ordinary text responses, then expands only after the application’s sensitive endpoints have been assessed. Possible mitigations include excluding those responses from compression, avoiding reflection of secrets and separating secret-bearing content from attacker-controlled text; select controls appropriate to the application rather than disabling Brotli indiscriminately.
Recommended Free Tools
NGINX or Apache: which setup fits your VPS?
| Decision point | NGINX | Apache |
|---|---|---|
| Module availability | Install a distribution- and build-compatible Brotli filter module; NGINX Plus documents nginx-plus-module-brotli. |
Use mod_brotli with Apache 2.4.26 or later. |
| Dynamic compression | brotli on; with MIME additions through brotli_types. |
AddOutputFilterByType BROTLI_COMPRESS for selected types. |
| Pre-compressed files | Load the static module and set brotli_static on;. |
Use a pre-compression arrangement that supplies Content-Encoding: br and varies caches on Accept-Encoding. |
| Scope control | Choose http, server or location scope and keep the MIME list explicit. |
Prefer MIME-type filtering; broad SetOutputFilter requires exclusions. |
| Operational check | nginx -t, then nginx -s reload. |
Run the installed Apache configuration test, then a graceful reload. |
| Security consideration | Both can expose sensitive TLS responses to compression side-channel risk; review secret-bearing endpoints before enabling broad coverage. | |
A practical rollout checklist
- Identify the active web server, distribution and virtual host serving the target URL.
- Install a module built for that server version and confirm its load path.
- Start with HTML and a small set of text MIME types; exclude already-compressed media and archives.
- Choose dynamic compression for changing responses or pre-compression for immutable build artifacts.
- For pre-compressed assets, provide matching
.brfiles, sendContent-Encoding: brand configure cache variation onAccept-Encoding. - Run the server’s configuration test before reloading.
- Reload gracefully and inspect logs for module or syntax errors.
- Verify a text asset with
curl -I -H 'Accept-Encoding: br', then test a client without Brotli support. - Measure CPU and response behavior under normal traffic.
- Review TLS endpoints that reflect user input or contain secrets before expanding the compression scope.
Bottom line
On NGINX, install and load the compatible Brotli filter module, enable brotli on, add only suitable MIME types, and optionally use brotli_static for build-generated files. On Apache 2.4.26 or later, enable mod_brotli and attach BROTLI_COMPRESS to selected text responses. Validate and reload before testing, confirm Content-Encoding: br and cache variation with curl, and keep CPU cost and BREACH-style exposure in scope as you expand beyond static assets.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




