WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
    • VMware Cloud Foundation 9
  • VKS
  • Homelab
    • Hardware Options
    • Hardware Reviews
    • Lab Deployment Scripts
    • Nested Virtualization
    • Homelab Podcasts
  • VMware Nostalgia
  • Apple
You are here: Home / Home Lab / Disable HTTP Range Requests on Synology WebStation, Apache or Nginx

Disable HTTP Range Requests on Synology WebStation, Apache or Nginx

01.14.2026 by William Lam // 2 Comments

I use my Synology NAS to host a variety of services including a web server, file server and a backup system. As part of some testing that I had been performing, I needed to ensure that my web server does not respond to HTTP Range Requests, which allow clients to retrieve specific byte ranges rather than downloading an entire resource in a single transfer.

We can check whether a web server supports HTTP Range Requests by specifying a range of bytes as demonstrated in this cURL example below:

curl -H "Range: bytes=0-10" -I http://depot.vcf.lab/PROD/vsan/hcl/lastupdatedtime.json -u $CREDS


You should receive an HTTP 206 response which indicates HTTP Range Requests is supported by your web server, which my Synology supports by default.

Unlike a traditional web server where disabling HTTP Range Requests is pretty straightforward, modifying the default behavior for Synology WebStation is slightly more complicated. After some trial and error, I was able to successfully disable HTTP Range Requests on my Synology system, and for those with a similar requirement, the following sections outline the steps for several popular web server backends.

Apache

Run sudo a2enmod and then add the following to your apache configuration and then restart apache.

Header unset Accept-Ranges
RequestHeader unset Range

Nginx

Add the following to your Nginx configuration and then restart Nginx.

max_ranges 0

Synology WebStation

Step 1 - Navigate to Package Center->Web Station->Web Portal and create a new Web Service Portal based on your desired configuration such as shown in the example below:

Step 2 - Navigate to Package Center->Web Station->Web Service and create a new Static Website to map the web service you had created to the desired document root and HTTP backend, which I am using Nginx.


Step 3 - SSH to your Synology and switch to the root user (or you can use sudo) and then cd into /usr/local/etc/nginx/sites-available directory. Depending on your setup, you may find a number of web portal configuration files and we need to identify the one that is mapped to ours that was created in Step 1. Since I choose a different HTTP port (8888), that would be one unique way to quickly search all files as that is the only service that is using that port on my Synology, which you can use the following command:

grep 8888 *


As you can see from the screenshot, our web portal configuration file is stored in ead24cle-18a1-4810-85b-9aab25d38383.w3conf 

Step 4 - We now need to view the contents of the file from Step 3 and look for the very last include statement, which in my example is /usr/local/etc/nginx/conf.d/.service.43e641d2-e92f-45d3-8590-801fb022ae26.91246eb8-1f73-4c40-a95b-cd1da6537dd1.conf

Step 5 - Finally, we can view the contents of this file to understand the full path to the user customization file (user.conf) as shown in the screenshot below.


We now have all the pieces of information to apply our custom configuration for your web service.

Step 6 - We need to create the directory before the user.conf which is the UUID shown in Step 5

mkdir -p /usr/local/etc/nginx/conf.d/91246eb8-1f73-4c40-a95b-cd1da6537dd1

Then we will create the /usr/local/etc/nginx/conf.d/91246eb8-1f73-4c40-a95b-cd1da6537dd1/user.conf that will contain your customization which should specify the desired location label within the root directory and the following for disabling HTTP range requests:

location /PROD/ {
    alias /volume1/web/PROD/;
    autoindex on;

    # Disable Byte-Range requests
    max_ranges 0;
    set $http_range "";
    add_header Accept-Ranges "none" always;

    # Performance
    gzip off;

    # Ensure Nginx looks for the file before giving up
    try_files $uri $uri/ =404;
}

Step 8 - Run the following command to verify that our configuration file is correct:

nginx -t

Step 9 - Run the following command to restart Nginx backend

synosystemctl restart nginx

Step 10 - If we now perform the same cURL operation against our new web service endpoint on port 8888:

curl -H "Range: bytes=0-10" -I http://depot.vcf.lab:8888/PROD/vsan/hcl/lastupdatedtime.json -u $CREDS

we can see that we no longer receive an HTTP 206 but just HTTP 200 response, which is verifies that the backend web server does not support an HTTP Range Requests anymore.

Categories // Home Lab Tags // Synology

Comments

  1. *protectedV says

    01/14/2026 at 10:09 am

    as far as I remember, Windows updates are relying on exactly this feature, we had to configure our squid proxy to support the same while downloading patches from the internet. Why do we need to disable that for vSphere? One would think that there is some metadata with checksum so even a flipping of a single bit would be notified by the updater. Range request could also be helpful to pause and resume downloads.

    Reply
    • William Lam says

      01/14/2026 at 12:55 pm

      I never said this was required for vSphere 🙂

      I just said I was doing some "testing" that had a requirement ...

      Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • USB Native Network Driver for ESXi supports Realtek RTL8157 & RTL8156BG 02/13/2026
  • Automating the Retrieval of VCF Installer Deployment Milestones 02/10/2026
  • Cross vCenter vMotion workloads from vSphere 7.0 to vSphere 9.0 02/09/2026
  • Installing Realtek Network Driver Fling using Free ESXi 8.0 Update 3e ISO 02/05/2026
  • Modern Kubernetes Visualization using Radar 02/01/2026

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.

To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2026

 

Loading Comments...