Introduction
When LiteSpeed is installed on a cPanel & WHM server, QUIC support is enabled by default for HTTPS virtual hosts. QUIC uses UDP port 443 to improve connection performance and reduce latency.
In some environments, administrators may need to disable QUIC globally or for specific domains due to firewall restrictions, compatibility concerns, or troubleshooting requirements.
Prerequisites
Before proceeding, ensure the following:
- Root access to the server
- LiteSpeed installed on a cPanel & WHM server
- Access to modify server configuration files
- Basic knowledge of Linux commands
- Backup of existing configuration files before making changes
Implementation
I. Disable QUIC for All Domains
To disable QUIC globally across the server, follow these steps.
Step 1: Edit the Global Apache Include File
Open the following file:
/etc/apache2/conf.d/includes/pre_main_global.conf
Add the following configuration:
<IfModule LiteSpeed>
QuicEnable off
</IfModule>
Step 2: Rebuild Apache Configuration and Restart LiteSpeed
Run the following command:
/usr/local/cpanel/scripts/rebuildhttpdconf && /usr/local/cpanel/scripts/restartsrv_apache
This rebuilds the Apache configuration and restarts the LiteSpeed service.
II. Disable QUIC for a Specific Domain
To disable QUIC only for a particular domain or virtual host, create custom userdata include files for both SSL and non-SSL virtual hosts.
Step 1: Create the Non-SSL Userdata Directory
mkdir -p /etc/apache2/conf.d/userdata/std/2_4/$user/$domain/
Step 2: Create the SSL Userdata Directory
mkdir -p /etc/apache2/conf.d/userdata/ssl/2_4/$user/$domain/
Replace:
$userwith the cPanel account username$domainwith the target domain name
Step 3: Create the QUIC Configuration File
Inside both directories, create the file:
quic_vhosts.conf
Add the following content:
<IfModule LiteSpeed>
QuicEnable off
</IfModule>
Step 4: Rebuild Configuration and Restart LiteSpeed
Run the following command:
/usr/local/cpanel/scripts/rebuildhttpdconf && /usr/local/cpanel/scripts/restartsrv_apache
Verification
After applying the configuration changes, verify that QUIC is disabled by checking the HTTP response headers or using online HTTP/3/QUIC testing tools.
Notes
- QUIC primarily affects HTTP/3 connections.
- Disabling QUIC does not disable HTTPS functionality.
- Ensure UDP port 443 handling aligns with your firewall and network configuration.
Conclusion
Disabling QUIC in LiteSpeed can help resolve compatibility, firewall, or networking issues in certain environments. Administrators can either disable QUIC globally for all hosted domains or selectively for specific virtual hosts based on operational requirements. After making configuration changes, always rebuild the Apache configuration and restart the LiteSpeed service to apply the updates successfully.